2014-03-11 08:58:36 +00:00
|
|
|
module Owner
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
validates :owner, presence: true
|
2014-03-13 10:43:04 +00:00
|
|
|
after_create do
|
2014-03-18 09:31:01 +00:00
|
|
|
relations.create(actor: owner, role: 'admin')
|
2014-03-13 10:43:04 +00:00
|
|
|
end
|
2014-03-11 08:58:36 +00:00
|
|
|
end
|
|
|
|
end
|