Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # example_controller.rb
- # Insert at top of controller
- before_action :set_example, only: [:show, :edit, :update, :destroy]
- # Insert at end of controller
- private
- def set_example
- @example = Example.find(params[:id])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement