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 =>
But, is there any other way that automatically adds this condition to
all the queries if a user is logged in?