diff options
-rw-r--r-- | app/models/user.rb | 7 | ||||
-rw-r--r-- | app/models/user_mailer.rb | 6 | ||||
-rw-r--r-- | todo.txt | 12 |
3 files changed, 15 insertions, 10 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index afbc63ba9..46ea25fcd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -19,7 +19,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user.rb,v 1.18 2008-01-10 18:20:35 francis Exp $ +# $Id: user.rb,v 1.19 2008-01-14 10:43:30 francis Exp $ require 'digest/sha1' @@ -78,6 +78,11 @@ class User < ActiveRecord::Base self.hashed_password = User.encrypted_password(self.password, self.salt) end + # For use in to/from in email messages + def name_and_email + return self.name + " <" + self.email + ">" + end + private def self.encrypted_password(password, salt) diff --git a/app/models/user_mailer.rb b/app/models/user_mailer.rb index 1e609ae32..46baa19c4 100644 --- a/app/models/user_mailer.rb +++ b/app/models/user_mailer.rb @@ -4,14 +4,14 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user_mailer.rb,v 1.3 2008-01-11 01:02:45 francis Exp $ +# $Id: user_mailer.rb,v 1.4 2008-01-14 10:43:30 francis Exp $ class UserMailer < ActionMailer::Base helper :application def confirm_login(user, reasons, url) - @from = MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost') - @recipients = user.email + @from = "GovernmentSpy <"+MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost')+">" + @recipients = user.name_and_email @subject = reasons[:email_subject] @body[:reasons] = reasons @body[:name] = user.name @@ -48,22 +48,19 @@ Show due date on, e.g. Sort by due date, show categorisation everywhere - Tidying ======= Add display of users to admin interface (so can find their email address out) Link internally between different bits of admin interface -Use working days - Bubbles don't validate http://localhost:3000/request/5 Add SQL database indexes to token / email_token in post_redirects Set "null" and "default" options more in schema -Add SQL foreign keys to database schema +Add SQL foreign keys to database schema (THIS IS IMPORTANT, or things will screw up) execute 'ALTER TABLE researchers ADD CONSTRAINT fk_researchers_departments FOREIGN KEY ( department_id ) REFERENCES departments( id ) ' http://wiki.rubyonrails.org/rails/pages/UsingMigrations link to: http://www.surfdewey.com/2.html @@ -78,6 +75,9 @@ Hook global error message also Check log rotation is working well +Mark some requests as test requests + + Legal/privacy ============= @@ -126,8 +126,6 @@ http://www.mysociety.org/2006/04/04/freedom-of-information-archive/ Check FOE site lots http://community.foe.co.uk/tools/right_to_know/request_generator.html -It has email addresses of lots of bodies, e.g. -http://community.foe.co.uk/app/tc Look at this basic US site http://www.rcfp.org/foi_letter/generate.php @@ -171,5 +169,7 @@ Schools list: www.edubase.gov.uk Heather has some for central departments +FOE site has email addresses of lots of bodies, e.g. +http://community.foe.co.uk/app/tc |