Has_and_belongs_to_many - ensure only rows with there user_i

Right now, im doing this in my controller:

@message = Message.find(params[:id],:conditions => [“user_id = ?”,

Is there a way to do with in models them self so i dont have to pass in
a user_id condition for all finds, deletes, etc?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs