kabir
kabir

Reputation: 542

form_tag not rendering in rails 3.2

I am following the tutorial at http://www.noupe.com/ajax/create-a-simple-twitter-app.html I am using ruby version 1.9.3p194 , rails version 3.2

When I created the view file index.html.erb , and put in the contents as

<b><%= render :partial => "message_form" %></b> 
<%= render :partial => @posts %>  

and then in the form partial , _message_form.html.erb

 In partial _message_form
<% form_tag(:controller => "posts", :action => "create", :method=>"post") do %>  
  <%= label_tag(:message, "What are you doing?") %><br/>  
  <%= text_area_tag(:message, nil, :size => "44x6") %><br/>   
  <%= submit_tag("Update") %>  
<% end %>

and load the index.html.erb , I only see the message "In partial _message_form" . the form tags do not render at all.

Need help. Would be glad to provide any additional required information

Upvotes: 2

Views: 2853

Answers (1)

Victor Moroz
Victor Moroz

Reputation: 9225

As far as I remember you need this: <%= form_tag...

UPDATE: There was a fallback to previous behavior (without =), but it doesn't seem to exist in Rails 3.2.6

Upvotes: 12

Related Questions