X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0d3a9ed9cb47ce3b89ea9eaffbb589f9a9ff6d22..dedd87da28b291db044318c1c114df8266b6c181:/app/models/message.rb?ds=sidebyside diff --git a/app/models/message.rb b/app/models/message.rb index f897af3c2..b51c59f43 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -9,8 +9,6 @@ class Message < ActiveRecord::Base validates_inclusion_of :message_read, :in => [ true, false ] validates_as_utf8 :title - attr_accessible :title, :body - after_initialize :set_defaults def self.from_mail(mail, from, to) @@ -26,14 +24,14 @@ class Message < ActiveRecord::Base body = mail.decoded end - message = Message.new({ + message = Message.new( :sender => from, :recipient => to, :sent_on => mail.date.new_offset(0), :title => mail.subject.sub(/\[OpenStreetMap\] */, ""), :body => body, :body_format => "text" - }, :without_protection => true) + ) end def body