Displaying 1 result from an estimated 1 matches for "assocc".
Did you mean:
assoc
2006 Jan 16
1
[roles/users]I give up, please help
...ice i set my mind on making a login
> system. because i would come across of regularly made source.
> files:
user_controller.rb, user.rb
> my table layout:
users: |id|username|password
usertypes: |id|name| (admin, moderator, guest)
users_usertypes: |usertype_id|user_id| (+foreign key assocc)
> i have this in my user.rb file:
class User < ActiveRecord::Base
has_and_belongs_to_many :usertypes, :join_table =>"users_usertypes"
end
class Usertype < ActiveRecord::Base
has_and_belongs_to_many :users, :join_table =>"users_usertypes"
end
> in the u...