Ruby on Rails Monday, November 29, 2010

basically you got two possibilities: 1. write the value into a session-variable   session[:object] = "some string or value"  2. pass your value as a parameter to some action and read params in your controller: view:   <%=  link_to "my_action" :controller => :bla, :action => :my_action, :object => "some string or value" %>


controller:   def my_action     puts params[:wtf]   end 


On Tue, Nov 30, 2010 at 9:46 AM, Paul Roche <lists@ruby-forum.com> wrote:
Sure. I have a page in (view\controller x) with an input field.
Submitting the form displays the value of the input field on this same
page.

There is a link on this page that connects to another page in a
different view/controller (view\controller y). I want to use the param
(input field value) as a conditon in a 'find' in the controller y. But I
am not yielding results. It's like the param is empty. I hope this makes
it a little clearer

--
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 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.




--
Thanks:
Rajeev sharma
+919013155133

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
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.

No comments:

Post a Comment