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.

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)

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