Hi,
I'm rendering a form using form_for, and Rails (2.0.2) is automatically generating the _method tag for me. Great! But why would the Rails team decide to wrap the thing in a div tag? Here is the output I'm getting:
<form action="/admin/content_blocks/1/publish" class="edit_content_block" id="PublishContentBlock" method="post"> <div style="margin:0;padding:0"><input name="_method" type="hidden" value="put" /></div> <input id="PublishContentBlock" name="commit" type="submit" value="Publish this Content Block" /> </form>
This is my code used to generate that:
<% form_for object, :url=>publish_admin_content_block_path(@object), :html=>{:id=>'PublishContentBlock'} do |f| %> <%== submit_tag 'Publish this Content Block', :id=>'PublishContentBlock' %> <% end %>
I need to display a button that's in a different form, but have the button appear next to (after, inline) the previous forms buttons. How can I do this is the styles are hard-coded into the div tag that wraps the hidden _method tag?
Matt