X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7be823bb11ad2aa93ffd4d85cc7f11469a867fa2..10e92b85a730836abe2d7c0564da0b5c55154f95:/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