X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbe165bbb3d6eda37d9579f1ac767599f9055607..ee53b7a298e75ac4c75866d6edea0a2611bdb663:/app/models/note.rb diff --git a/app/models/note.rb b/app/models/note.rb index 31056be49..d2c36071d 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -7,7 +7,7 @@ class Note < ActiveRecord::Base :numericality => { :on => :update, :integer_only => true } validates :latitude, :longitude, :numericality => { :only_integer => true } validates :closed_at, :presence => true, :if => proc { :status == "closed" } - validates :status, :inclusion => %w(open closed hidden) + validates :status, :inclusion => %w[open closed hidden] validate :validate_position @@ -59,6 +59,6 @@ class Note < ActiveRecord::Base # Fill in default values for new notes def set_defaults - self.status = "open" unless self.attribute_present?(:status) + self.status = "open" unless attribute_present?(:status) end end