It's because of this line in the _form.html.erb...isn't it...
<% form_for @knodes, :url => { :action => :edit } do |f| %>
the { :action => :edit } is keeping it on edit and not pushing it to
update
i put that in there for edit and new because without it for
new.html.erb, i keep getting:
===============================
NoMethodError in Knodes#new
Showing .../app/views/knodes/_new_form.html.erb where line #1 raised:
undefined method `knodes_index_path' for
#<#<Class:0xb65df780>:0xb65d71d4>
Extracted source (around line #1):
1: <% form_for @knodes do |f| %>
2: <% if @knodes.errors.any? %>
3: <div id="error_explanation">
4: <h2><%= pluralize(@knodes.errors.count, "error") %> prohibited
this knode from being saved:</h2>
=================================
So I guess this is a new problem all together. Taking the line:
{ :action => :edit }
out of the _form.html.erb for edit makes it work btw. I guess my
problem is with the NoMethodError in Knodes#new
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment