Okay, sorry about that. Inexperience with the has_many :through apparently... Found that I needed to have a relationship with the city_county model as well so that it would simply have a "has_many :city_counties" before each of the has_many ____, :through => :city_counties for both the city.rb and county.rb models.
Now "children :properties, :counties" no longer blows up either. -George On Jun 25, 1:44 pm, ylluminate <[email protected]> wrote: > I could really use some input here as I at least figured out where it > is blowing up. > > First, I got it back to where it was blowing up again and then started > stepping changes back out until I figured out that it is from two > models that I'm attempting to establish a many-to-many relationship > with. > > I guess I should first explain the two models:http://bit.ly/kDc8al > > The models migrate just fine, but do explode when I put in "children": > city.rb Model:http://pastie.org/private/tnntwg3dupgay7ttwdqnq > county.rb Model:http://pastie.org/private/sxsllscttipn7ljjwu9oug > city_county.rb Model:http://pastie.org/private/voq80qpcmeqyefknonh6oq > > However, when I attempt to add a city or view a city I had created > earlier, for example, the application returns the following error: > ActiveRecord::HasManyThroughAssociationNotFoundError in Cities#new > Showing controller: cities; dryml-tag: new-page where line #1 raised: > Could not find the association :city_counties in model City > Extracted source (around line #1): > 0 > > And on the rails server console: > ActionView::Template::Error (Could not find the > association :city_counties in model City): > 0 app/views/taglibs/auto/rapid/forms.dryml:6:in `block (3 levels) in > form__for_city' > app/views/taglibs/auto/rapid/forms.dryml:4:in `block (2 levels) in > form__for_city' > app/views/taglibs/auto/rapid/forms.dryml:4:in `block in > form__for_city' > app/views/taglibs/auto/rapid/forms.dryml:3:in `form__for_city' > app/views/taglibs/auto/rapid/pages.dryml:76:in `block (6 levels) in > new_page__for_city' > app/views/taglibs/auto/rapid/pages.dryml:75:in `block (5 levels) in > new_page__for_city' > app/views/taglibs/auto/rapid/pages.dryml:75:in `block (4 levels) in > new_page__for_city' > app/views/taglibs/auto/rapid/pages.dryml:66:in `block (3 levels) in > new_page__for_city' > app/views/taglibs/themes/clean/clean.dryml:2:in `block in > page_with_aaa82d3a9ca5' > app/views/taglibs/themes/clean/clean.dryml:1:in > `page_with_aaa82d3a9ca5' > app/views/taglibs/application.dryml:12:in `block in > page_with_a46705120a36' > app/views/taglibs/application.dryml:11:in `page_with_a46705120a36' > app/views/taglibs/auto/rapid/pages.dryml:63:in `block in > new_page__for_city' > app/views/taglibs/auto/rapid/pages.dryml:62:in `new_page__for_city' > > Any thoughts here? > > On Jun 24, 5:33 pm, Bob Sleys <[email protected]> wrote: > > > > > > > > > I've seen that kind of error when not setting the mode name correctly, IE > > running the generator and specifying the model as plural instead of > > singular. It gets confused between the singular/plural versons. > > > Bob -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
