Displaying 2 results from an estimated 2 matches for "accesscontrollistexample".
2005 Mar 26
2
ActiveRecord help needed
Hello, my name is Magnus and I am a RoR-newbie. I am trying to get the
grip of ActiveRecord but I am having trouble to find good examples.
I have been looking at this:
http://wiki.rubyonrails.com/rails/show/AccessControlListExample
Where you can find this Model code:
require ''active_record''
class Permission < ActiveRecord::Base
has_and_belongs_to_many :roles
end
class Role < ActiveRecord::Base
has_and_belongs_to_many :permissions
has_and_belongs_to_many :users
end
class User < ActiveRe...
2006 Jul 26
2
newbie - HABTM confused...
I have a users table. I have a assignment table. and I have to log in
to see my assignments. i can and I hasve a session id.
I can make a new assignment and save my id in the user_id field of the
assigment table.
I want to share my assignments. so I can create a assignments_users
table. this way I can have assignment 1 shared with user 1 and 2. and
If I log in as user 1 or 2 I see the assignment.