Reputation: 1
The following code in not rendering even the buttons:
<% form_tag :controller=> :create_new, :action=>:input do %>
<%=text_field_tag :my_input%>
<%=submit_tag "Send input"%>
<%end%>
the controller create_new has the following method:
def input
@my_input=params[:my_input]
end
the routes.rb has::
resources :create_new do
post :input, :on=>:collection
Upvotes: 0
Views: 82
Reputation: 11876
<%= form_tag input_create_new_path, :html_options => {:method => :post} do |f| %>
<%= f.text_field :my_input%>
<%= f.submit "Send input"%>
<%end%>
Upvotes: 0
Reputation: 1815
For rails 3 we have to use '=' symbol for form_tag and form_for. so change your code as follows..
<%=form_tag :controller=> :create_new, :action=>:input do %>
<%=text_field_tag :my_input%>
<%=submit_tag "Send input"%>
<%end%>
Upvotes: 0