Hi Don,

I think you have a typo in your code. You have:

  belongs_to :region, :inverse_of => :locality

But I think it should be:

  belongs_to :region, :inverse_of => :localities

Warm regards,
Ignacio

El 15/04/14 18:46, Donald Ziesig escribió:
> Hi All!
> 
> In an attempt to optimize memory and i/o usage, I added inverse_of to
> some of my associations (works with html).  Unfortunately, I get the
> following error when trying to create a new "region" (This is the first
> step in the process):
> 
> Showing /controller: regions; dryml-tag: new-page/ where line *#1* raised:
> 
> |Could not find the inverse association for region (:locality in Region)|
> 
> 
> The failing code is like this:
> 
> 
> class Region < ActiveRecord::Base
> 
>   hobo_model # Don't put anything above this
> *
> *
> *
>   has_many :localities, :dependent => :destroy, :accessible => true, 
> autosave: true, :inverse_of => :region
> 
> and
> 
> class Locality < ActiveRecord::Base
> 
>   hobo_model # Don't put anything above this
> *
> *
> *
>   belongs_to :region, :inverse_of => :locality
> 
> Does anyone have any suggestions as to corrections or work-arounds?
> 
> Thanks,
> 
> Don Ziesig
> 
> 
> ||
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to