Abhishek shukla
2009-Aug-26 05:58 UTC
authlogic + validates_uniqueness_of_login_field_options
Hello Friends, Just wanted to know if someone override the validates_uniqueness_of_login_field_options method. Whenever I am parsing validates_uniqueness_of_login_field_options(:if => true) the following error I am getting "Callbacks must be a symbol denoting the method to call, a string to be evaluated, a block to be invoked, or an object responding to the callback method." Let me know If I can override the authlogic validation. My Requirement. 1. There is two type of user(Admin, Customer) and We are storing the user credential in a same table "users" With the STI. Now the uniqueness for Admin uniqueness should work as it is working right now(It should be unique in all the condition). But the Cusomter should be unique for the perticular Admin. 2. The customer relation with the admin we are storing in CustomerDetails table with the user_id as a foreign key. Regards Abhis --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---