search for: item_form

Displaying 2 results from an estimated 2 matches for "item_form".

2009 Mar 09
2
form_tag error: only get requests allowed
I am getting above error while updating an item using form_tag helper. <h1>Edit Topic Item</h1> <% form_tag edit_topic_item_path(@item.topic, @item), :html => { :method => :put} do %> <%= render :partial => ''item_form'', :object => @item %> <%= submit_tag ''Save'' %> <% end %> <%= link_to ''Add Sub-Item to this Element'', :action => :add_subitem, :id => @item %> <br /> <br /> Any clues? -- Posted via http://www.ruby-forum.com/...
2009 Mar 08
0
undefined variable or method in form_tag url
...:Base:0xb7065650>", when I try to create a new item. Following is the code in my new.rhtml <h1>New <%= @is_subitem ? ''Subitem'' : ''Item'' %></h1> <% form_tag :item, :url => item_path do %> <%= render :partial => ''item_form'' %> <%= submit_tag "Create" %> <% end %> The new and create actions are as follows: def new @item = Item.new end def create @item = Item.new(params[:items]) @topic = Topic.find(params[:topic_id]) @item.topic = @topic @item.position = @...