please can anyone suggest me a code to pass a variable which
is in the view to controller
please can anyone suggest me a code to pass a variable which
is in the view to controller
Ishara Gunathilake wrote:
please can anyone suggest me a code to pass a variable whichis in the
view
to controller
Can you please provide the exact problem? So that can try for solution.
Ishara Gunathilake wrote:
please can anyone suggest me a code to pass a variable whichis in the
view
to controller
Can you please provide the exact problem? So that can try for solution.
Hi, I agree with Priya. What are you trying to do exactly? Please provide a use case or
scenario.
-Conrad
basically you got two possibilities:
1. write the value into a session-variable
session[:wtf] = "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, :wtf => "some string or value" %>
controller:
def my_action
puts params[:wtf]
end
Yes