diff options
-rw-r--r-- | app/helpers/application_helper.rb | 9 | ||||
-rw-r--r-- | app/models/user.rb | 6 | ||||
-rw-r--r-- | todo.txt | 5 |
3 files changed, 13 insertions, 7 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d645a8b95..7ad5d5b31 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,4 +1,11 @@ +# app/helpers/application_helper.rb: # Methods added to this helper will be available to all templates in the application. +# +# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. +# Email: francis@mysociety.org; WWW: http://www.mysociety.org/ +# +# $Id: application_helper.rb,v 1.5 2007-09-12 08:52:23 francis Exp $ + module ApplicationHelper # Copied from error_messages_for in active_record_helper.rb @@ -27,5 +34,5 @@ module ApplicationHelper end end - end + diff --git a/app/models/user.rb b/app/models/user.rb index 75397b33b..97f781151 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -4,7 +4,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.5 2007-09-11 15:26:12 francis Exp $ +# $Id: user.rb,v 1.6 2007-09-12 08:52:23 francis Exp $ require 'digest/sha1' @@ -21,9 +21,7 @@ class User < ActiveRecord::Base def validate errors.add_to_base("Missing password") if hashed_password.blank? - unless MySociety::Validate.is_valid_email(email) - errors.add(:email, "doesn't look like a valid address") - end + errors.add(:email, "doesn't look like a valid address") unless MySociety::Validate.is_valid_email(email) end # Return user given login email and password @@ -1,8 +1,6 @@ Give a better login dialog Tidy up error message text (like "body must be filled in") on info request form -Check using :string rather than :text for definitely limited fields like "status" -IF just title is blank says "Info request must be filled in" Redirect the front page to the new FOI request page Make it say "dear" as default letter @@ -12,6 +10,9 @@ Write some tests (try it their way, at every level) Tidying ======= +If just summary/title is blank says "Info request must be filled in" as spurious extra error +If summary is blank, says "title must be filled in" grrrr + Rename "file_request" controller to "new" ? Set "null" and "default" options more in schema Add SQL foreign keys to database schema |