Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def show
@user=User.find(params[:id])
@user.set_view_profile(@user.id, false)
@rental_agreements = RentalAgreement.where(:owner_id => @user.id)
@tools = Tool.where(:user_id => @user.id)
respond_to do |format|
format.html # show.html.erb
format.json { render json: @user }
end
rescue ActiveRecord::RecordNotFound
flash[:notice] = "Something went horrible"
redirect_to :action => 'show'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.