On Martes, 19 de Mayo de 2009 22:50:42 johnnybutler7 escribió:
> Hi,
>
> I have the following model,
>
> class Group < ActiveRecord::Base
>
>   has_and_belongs_to_many :subgroups, :class_name =>
> "Group", :join_table => "groups_subgroups", :foreign_key =>
> "group_id",  :association_foreign_key => "subgroup_id"
>
> end
>
> In the console this works fine, i can create groups and add subgroups
> to a group etc.
>
> In my AS controller i have:
>
> config.nested.add_link "Subgroups", [:subgroups]
> config.columns[:subgroups].association.reverse = :groups
>
>
> This gives me a malformed constraint error which i cant understand
> why.  Funny enough if i do the below it works but doesnt pick up the
> subgroups

Please, paste the errors

>
> config.nested.add_link "Subgroups", [:subgroups]
> config.columns[:subgroups].association.reverse = :subgroups
>
> Can anyone spot what im doing wrong?
>
> JB
> 
-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]


--~--~---------~--~----~------------~-------~--~----~
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