On 11 February 2011 22:40, msaspence msaspe...@gmail.com wrote:
I'm want to restrict access to an object show action to the owner
in my action I have this
def show
@thing = Thing.find(params[:id])
if current_user @thing.owner == current_user
Not related to your problem, but just
I'm want to restrict access to an object show action to the owner
in my action I have this
def show
@thing = Thing.find(params[:id])
if current_user @thing.owner == current_user
respond_to do |format|
format.json { render :json = @thing }
end
else
render
2 matches
Mail list logo