Updating database entries through ActionController

Presumably the data that you have for the user has some link to the user. Ie

class User< AR::B

has_many :things

end

class Thing <AR::B

belongs_to :user

end

There are a couple of options that come to mind to scope these objects to their owners.

  1. use with_scope. This can help with this area and is available in the docs.

  2. follow the chain of ownership. eg

current_user.things.find( params[:id] )

If the thing does not belong to the user, it will be nil.

Either or both of these should do what you need.

Hope that helps