Advertisement
saasbook

show_method.rb

Aug 15th, 2013
1,358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.22 KB | None | 0 0
  1. # in app/controllers/movies_controller.rb
  2.  
  3. def show
  4.   id = params[:id] # retrieve movie ID from URI route
  5.   @movie = Movie.find(id) # look up movie by unique ID
  6.   # will render app/views/movies/show.html.haml by default
  7. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement