]> git.openstreetmap.org Git - rails.git/blobdiff - script/deliver-message
Turn on mass assignment protection
[rails.git] / script / deliver-message
index 9cce21f30700a881bae47f0b8b28e99cb58f4cf5..669e54a667fef1459b1e9c206d76c8affc4333f7 100755 (executable)
@@ -26,10 +26,13 @@ else
   body = mail
 end
 
-message = Message.new(:sender => from, :recipient => to,
-                      :sent_on => mail.date.new_offset(0),
-                      :title => mail.subject.sub(/\[OpenStreetMap\] */, ""),
-                      :body => body.decoded)
+message = Message.new({
+  :sender => from,
+  :recipient => to,
+  :sent_on => mail.date.new_offset(0),
+  :title => mail.subject.sub(/\[OpenStreetMap\] */, ""),
+  :body => body.decoded
+}, :without_protection => true)
 message.save!
 
 Notifier.message_notification(message).deliver