Hi all,

I'm building a fairly large Rails app for my current client and am doing a 
bit of a restructure of the database after a manic few months getting 
version one up and running.

I've tried to group tables into namespaces based on functionality and am 
having some serious difficulty getting form_for to work when it is 
operating on nested resources within a namespace.

>From routes.rb:
*...*
* namespace :reconciliation do*
* resources :charges do*
* resources :charge_rates*
*  end
*
* end*
*...*
*
*
>From the relevant _form.html:
*= form_for [:reconciliation, @charge, @charge_rate], :html => {:multipart 
=> true, :class => "edit_form"} do |f|*
...

The line above raises: *undefined method 
`reconciliation_reconciliation_charge_reconciliation_charge_rates_path' for 
#<#<Class:0x3758100>:0x3778080>* in polymorphic_url.
*
*
I have verified that both @charge and @charge_rate are not null and are of 
the appropriate type (Reconciliation::Charge and 
Reconciliation::ChargeRate).

rake routes shows that the reconciliation_charge_charge_rates_path exists.

According to every article I could find on Stack Overflow, my _form.html 
code *should* work, what am I doing wrong?

Thanks,

Mike

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rails-oceania?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to