Topic: form_tag

I have created small application using form.

It shows the follwing error:

Showing admin/author/new.html.erb where line #4 raised:

undefined local variable or method `end_form_tag' for #<ActionView::Base:0x37c3e88>


plese give me a soultion for above error.

This is our new.html.erb file

  <%= form_tag :action => 'create' %>
   <%= render :partial => 'form' %>
   <%= submit_tag 'Create' %>
<%= end_form_tag %>

<%= link_to 'Back', :action => 'index' %>

Re: form_tag

It looks like you are probably usually a old rails syntax in a newer version of rails. What you probably want to do is

<%= form_tag :action => 'create' do %>
  <%= render :partial => 'form' %>
  <%= submit_tag 'Create' %>
<% end %>
<%= link_to 'Back', :action => 'index' %>

If this doesn't work, please verify the version of Rails you are using. You may not need the equals sign for rails 2 before the form_tag.