Hi, This is about this book : http://www.pragmaticprogrammer.com/titles/fr_rr/index.html The recipe #32 is about creating a role based authentification. In the book, we use 3 tables: "user" wich has and belongs to many "role" wich has and belongs to many "right": class User < ActiveRecord::Base has_and_belongs_to_many :roles end class Role < ActiveRecord::Base has_and_belongs_to_many :users has_and_belongs_to_many :rights end class Right < ActiveRecord::Base has_and_belongs_to_many :roles end But I think it is better to set something like that: class Right < ActiveRecord::Base has_many :roles has_many :users, :through => :roles end class User < ActiveRecord::Base has_many :roles has_many :right, :through => :roles end class Role < ActiveRecord::Base belongs_to :group belongs_to :user end Do you think it is better ? IMHA It looks more " Rails 1.2" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---