Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redirect_to with params. How to pass them to my view?

I'm new with rails. I have used the redirect_to with params in my action, but now I don't know how to show these params to my view?

like image 700
user1312490 Avatar asked May 23 '12 16:05

user1312490


1 Answers

Try this variants:

  • redirect_to controller: 'thing', action: 'edit', id: 3, something: 'else'
  • redirect_to thing_path(@thing, foo: params[:foo])

Also, this link should be helpful for you.

like image 195
Kashiftufail Avatar answered Nov 13 '22 06:11

Kashiftufail