]> git.openstreetmap.org Git - rails.git/blobdiff - script/deliver-message
Use model relations when creating objects from factories
[rails.git] / script / deliver-message
index e713b2cfcab93c25c567d4e78a9228a6be2dd1dd..04dcb881bc0699b3b948a9119b53d567565ecd6a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 
-require File.dirname(__FILE__) + '/../config/environment'
+require File.dirname(__FILE__) + "/../config/environment"
 
 exit 0 unless recipient = ARGV[0].match(/^([cm])-(\d+)-(.*)$/)
 
@@ -18,7 +18,7 @@ else
   to = message.sender
 end
 
-exit 0 unless recipient[3] == digest[0,6]
+exit 0 unless recipient[3] == digest[0, 6]
 exit 0 if date < 1.month.ago
 
 message.update_attribute(:message_read, true) if message