Skip to content

Instantly share code, notes, and snippets.

@davetheninja
Created November 6, 2012 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save davetheninja/4024176 to your computer and use it in GitHub Desktop.
Save davetheninja/4024176 to your computer and use it in GitHub Desktop.
Can this be simplified??
def get_course
course_id = nil
course_id = params[:course][:id] if not params[:course].nil? and params[:course].has_key(:id)
Course.find_by_id(course_id)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment