Skip to content

Instantly share code, notes, and snippets.

@dohoonk
Created February 4, 2016 04:04
Show Gist options
  • Select an option

  • Save dohoonk/1788238317c2cac31fc8 to your computer and use it in GitHub Desktop.

Select an option

Save dohoonk/1788238317c2cac31fc8 to your computer and use it in GitHub Desktop.
READ

1.get "/questions/:id" => "questions#show", as: :question

2.create control method def show @question = Question.find params[:id] end

3.create view page

redirect_to question_path({id: @question.id})

redirect_to question_path({id: @question})

redirect_to question_path({@question})

reidrect_to @question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment