Hi, I''m just working my way through Rails and had a question on validations. It seems that the default ActiveRecord validation only works on "save", "create", "update", etc. Assume I have a form for registration, which creates the user, and another one for login which references the user record (username, password). How do I make the login also check that the user has filled the form or entered a username? Is it programmatic in the controller, or is there some rails mechanism that enables me to apply many of the same validations I use for registration, also for login? Many Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 13, 5:12 pm, "Farhad" <ffarza...@gmail.com> wrote:> references the user record (username, password). How do I make the > login also check that the user has filled the form or entered a > username? Is it programmatic in the controller, or is there some rails > mechanism that enables me to apply many of the same validations I use > for registration, also for login?Hi Farhad, You should direct questions like this to the general list[1]. The core list is meant for discussion of the framework''s development, not questions about it usage. [1] http://groups.google.com/group/rubyonrails-talk -- Regards, John Wilger --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Oops - my bad. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---