Created
October 17, 2016 16:25
-
-
Save lkrych/0e0842e43a8b3e50b0475318b55fcb35 to your computer and use it in GitHub Desktop.
Read method pulled from movies_controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MoviesController < ApplicationController | |
#some code | |
def show | |
id = params[:id] # retrieve movie ID from URI route | |
@movie = Movie.find(id) # look up movie by unique ID | |
# will render app/views/movies/show.<extension> by default | |
end | |
#some code | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment