On Jueves, 5 de Agosto de 2010 20:31:58 kwb escribió:
> I'm creating an app and I'm using the three plugins listed in the
> subject line.
>
> I can create an app without authlogic and declarative_authorization
> (DA), and I can edit has_many :through relationships.
>
> As soon I incorporate authlogic and DA, I can no longer edit
> has_many :through relationship.

What do you change in your models or active scaffold controllers when you add 
DA? Does adding only authlogic break editing has_many :through?

>
> I am trying to add roles to a user through the users active scaffold
> interface.
>
> My code is as follows for users, roles, and assignments
>
> class User < ActiveRecord::Base
>   has_many :assignments
>   has_many :roles, :through => :assignments
>
>   def role_symbols
>     roles.collect {|r| r.name.underscore.to_sym}
>   end
> end
>
> class Assignment < ActiveRecord::Base
>   belongs_to :user
>   belongs_to :role
> end
>
> class Role < ActiveRecord::Base
>   has_many :roles
>   has_many :users, :through => :assignments
> end
>
>
> Any help in solving this would be greatly appreciated as I am a Rails
> newbie (I started monday)

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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