form in main application layout

13 views
Skip to first unread message

fugee ohu

unread,
Jan 4, 2016, 7:40:07 PM1/4/16
to Ruby on Rails: Talk
i put a search box in application.html.erb and created a controller action, but i don't know how to route to the controller action

Karthikeyan A K

unread,
Jan 5, 2016, 12:58:08 AM1/5/16
to rubyonra...@googlegroups.com
Might be like this

<%= form_tag {controller: controller_name, action: action_name } do %>
......
......
<% end %>


On Tue, Jan 5, 2016 at 6:10 AM, fugee ohu <fuge...@gmail.com> wrote:
i put a search box in application.html.erb and created a controller action, but i don't know how to route to the controller action

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ad988bc6-8e5a-48e9-8a26-f4fc320ae187%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karthikeyan A K
https://goo.gl/NYcfo3 - My Ruby Book
Reply all
Reply to author
Forward
0 new messages