I’m trying to get nested resources working, however I’ve run into a
peculiar problem which seems like it may be a bug.

I have Projects which have Analyses, or the singular versions Project &
Analysis.  Here’s my routes.rb entry:

resources :projects do
    resources :analyses
end

For example:  /projects/2/analyses/3.  The new works fine:
projects/2/analyses/new

Almost everything works, except for the analysis edit:
projects/2/analyses/3/edit

It returns the following error:

NoMethodError in Analyses#edit
undefined method `project_analyasis_path’

This is bizarre since it is trying to find analyasis which is
misspelled.  Nowhere in my code is analysis or analyses misspelled as
analyasis.

Here’s my analysis _form partial:

<%= form_for [@project, @analysis] do |f| %>

if I change it to <%= form_for [@project, @analysis], :url =>
project_analysis_path(@project, @analysis) do |f| %> edit will work,
however new ceases to work.

Any ideas?  Is this a bug in form_helper.rb?

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to