Cross Reference: team_user.rb
xref
: /
ontohub
/
app
/
models
/
team_user.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
team_user.rb revision db5e5ce1aaece909027be839755bcea14679f1e0
class
TeamUser
<
ActiveRecord
::
Base
belongs_to
:
team
belongs_to
:
user
attr_accessible
:
user
, :
admin
attr_accessible
:
user_id
, :
team_id
before_create
:
set_admin_if_owner
protected
def
set_admin_if_owner
self.admin
=
true
if
!
admin
&&
team.users.empty
?
end
end