Ruby on Rails
Thursday, June 28, 2012
You can pass parameter as
redirect_to :controller=>'tips', :action => 'show', :id => "1"
or
redirect_to params[:search].merge! (:action => 'list')
On Thursday, 28 June 2012 04:02:33 UTC+5:30, Ruby-Forum.com User wrote:
Hi,--
I have 2 controllers A and B. The create method in controller A is
programmed to redirect to B#index method. I want to pass data between my
controllers, so i have made use of the params hash. But i cannot access
the params hash on the index method of B controller. what is the right
way to pass values between controllers?
--
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/FmkPJc4GOzsJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment