X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/233a97bfcbee9c82027c049bb8bafac2693ec359..a5e5cbc73999d004998e1e90b1b19796a94b077d:/app/models/changeset.rb diff --git a/app/models/changeset.rb b/app/models/changeset.rb index caa167c9e..dc6c0e014 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -12,7 +12,7 @@ class Changeset < ActiveRecord::Base has_many :old_ways has_many :old_relations - validates_presence_of :user_id, :created_at, :open + validates_presence_of :user_id, :created_at validates_inclusion_of :open, :in => [ true, false ] # Use a method like this, so that we can easily change how we @@ -47,6 +47,10 @@ class Changeset < ActiveRecord::Base return cs end + def tags_as_hash + return tags + end + def tags unless @tags @tags = {}