In my routes file I have:
resources :features, :as => 'featured'
However, when I use the following:
<% form_for @feature, :html => { :multipart => true } do |f| -%>
<%= render :partial => "form", :locals => { :f => f } -%>
<p><%= submit_tag "Feature these submissions" -%></p>
<% end -%>
I receive this error:
“undefined method `features_path’ for #<#:0x00000106228ec0>”
This is my “new” method in the “features_controller”:
def new
@feature = Feature.new
@submissions = Submission.find(pending_featured_submissions)
end
Before I upgraded to Rails 3, Rails was able to figure out that I was using a custom named helper. Now it seems as though form_for is ignoring the line in my resources file and using features_path, when it should be used featured_path.
Maybe I’m doing something wrong, or missing something.
Thanks for looking =)
For what its worth I ended up having to specify the url in the form builder.