Hi, I would like which is the best way to implement this: I have an application with invoices, lines, accouts, etc... lots of models. Each element of a model belongs to a different user so when a user is logged he will see only his elements. I can implement this adding in all the find methods the condition :user_id => params[:user_id].
But, is there any other way that automatically adds this condition to all the queries if a user is logged in? -- 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 [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 -~----------~----~----~----~------~----~------~--~---

