X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e1b205913c9afd6b41684add7308cef4613112e2..2c16177174d276335babcca5439cd4e97af62ffa:/app/models/changeset.rb diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 934d75e39..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 = {} @@ -71,6 +75,7 @@ class Changeset < ActiveRecord::Base Changeset.transaction do # fixme update modified_at time? + # FIXME there is no modified_at time, should it be added self.save! end