18 lines
332 B
Ruby
18 lines
332 B
Ruby
|
module Modules
|
||
|
module Models
|
||
|
module Owner
|
||
|
extend ActiveSupport::Concern
|
||
|
|
||
|
included do
|
||
|
after_create lambda { relations.create :object_id => owner.id, :object_type => owner.class.to_s, :role => 'admin' }
|
||
|
end
|
||
|
|
||
|
module InstanceMethods
|
||
|
end
|
||
|
|
||
|
module ClassMethods
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|