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

config.nested.add_link "Subgroups", [:subgroups]
config.columns[:subgroups].association.reverse = :subgroups

Can anyone spot what im doing wrong?

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