On 8 October 2010 14:56, radhames brito <[email protected]> wrote: > [...] > Because you have one user model i have 4, so when i authenticate i have to > loop all the models to find the credentials beacuse there can be a > company_user with name "pedro" and an admin name "pedro" because they are 2 > diferent models, there is another problem because those 2 pedros could have > the same password, all because i am using different models for each user > type. >
I am sorry to have to point out that the route you have gone down here supports Marnen's contention that model definition should not be started till the operational requirements are known. I imagine in your original spec you would have specified a single logon page (not four different ones). This is a clue that all the different types of users should be of the same (or derived) types. :( Colin -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

