Form_remote_tag

How can I get a name/id for a form using the remote form tag?
<%= form_remote_tag :url => { :action => :add_to_cart, :id => timecard }
%>

gives me:

But there is no form ID in there. I’ve tried putting “:id => timecard”
before and after the :url assignment, but it never actually shows up.

In the mean time I’ve gotten rid of those tags and just created the form
myself. Anyone know what the ‘ruby way’ to do this?

Bob wrote:

How can I get a name/id for a form using the remote form tag?
<%= form_remote_tag :url => { :action => :add_to_cart, :id => timecard }
%>

gives me:

But there is no form ID in there. I’ve tried putting “:id => timecard”
before and after the :url assignment, but it never actually shows up.

In the mean time I’ve gotten rid of those tags and just created the form
myself. Anyone know what the ‘ruby way’ to do this?

I’m new at this, but I think you can do something like:

form_remote_tag :html => { :name => ‘form_name’, :id => ‘form_id’ },
:url => { :action => :add_to_cart, :id => timecard }

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs