X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0d3a9ed9cb47ce3b89ea9eaffbb589f9a9ff6d22..22408c3e5bbce14b70b56be3a02122e2db3de896:/app/models/message.rb 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