On 17.6.2008, at 17.46, zenonn wrote:
>
> Hello
>
> I am getting this error for this code: undefined local variable or
> method `end_of_tag'
>
> <%= form_tag :action => 'create' %>
> <%= render :partial => 'form' %>
> <%= submit_tag 'Create' %>
> <%= end_of_tag %>
I think you mean end_form_tag. Anyway, it's removed from Rails 2 in
favor of using the block for of form tag:
<% form_tag :action => "create" do |f| %>
...
<% end %>
I'd also recommend taking a look at form_for in the api docs: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M000920
Cheers,
//jarkko
>
>
> <%= link_to 'Back', :action =>'index' %>
>
> is this helper not working in 2.1
> thanks
> chris
>
>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Beginning Ruby on Rails E-Commerce" group.
> To post to this group, send email to railsec...@googlegroups.com
> To unsubscribe from this group, send email to railsecommerc...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/railsecommerce?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi