Rob Aldred wrote:
> Hi,
> I want to be able to have a more detailed friendly message for users
> when they register with an email address thats already taken.
> 
> At the moment I have written a small validation method to produce what
> I want, personally I dont like it because I've had to include modules
> that shouldn't really be there (ActionController::UrlWriter and
> ActionView::Helpers)

If you need a URL in your error message, then this is the proper way, I 
think.  It's not true that UrlWriter "shouldn't really be there" if it's 
necessary for the functionality you need.

Of course, to some extent this is a design flaw of Rails: validations 
should certainly be handled by the model, but I find myself thinking 
that error messages should have been in the controller...

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to