Forked from davetheninja/scheduled_courses_controller.rb
Created
November 6, 2012 11:43
-
-
Save matthewrudy/4024191 to your computer and use it in GitHub Desktop.
Can this be simplified??
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
def get_course | |
if params[:course] && course_id = params[:course][:id] | |
Course.find_by_id(course_id) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
def get_course
course_params = params[:course]
Course.find_by_id(course_params[:id]) unless course_params.nil?
end