Hey Ed,

I'm having the same trouble. This is after an update to Rails 2.3.4
and an update to the latest ActiveScaffold. In looking a little
further, even though I have the reverse associations this is still
being thrown. I'd be interested in hearing if anyone else is having
the trouble and how they solved it.

Don

On Nov 25, 4:21 pm, Ed W <[email protected]> wrote:
> Hi, I have been quite extensively using an "has_many" association to
> wrap up things like custom queries (eg where you need to go outside of
> rails' every table is related to each other like so)
>
> However, the code seems to have changed and now I get a bunch of:
>
> ActiveScaffold::ReverseAssociationRequired: In order to support :has_one
> and :has_many where the parent record is new and the child record(s)
> validate the presence of the parent, ActiveScaffold requires the reverse
> association (the belongs_to).
>
> (comes from attribute_params.rb line 79)
>
> Firstly it would be helpful if the error message showed the relationship
> which is breaking (helps debugging).  I guess #{a.name} would do it?
>
> However, the bigger complication is that I am not sure that I can bend
> AR to allow me to create a correct belongs_to association for the
> reverse query on all of these.  Additionally it seems like the current
> test is a bit harsh because it fires on EVERY has_one/many regardless of
> whether the child does actually validate the presence of the parent?
>
> Could someone please help with a bit of background on this before I hack
> a bit?
>
> Thanks
>
> Ed W

--

You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.


Reply via email to