rosa-build/lib/modules/models/owner.rb

15 lines
325 B
Ruby

# -*- encoding : utf-8 -*-
module Modules
module Models
module Owner
extend ActiveSupport::Concern
included do
validates :owner, :presence => true
after_create lambda { relations.create :actor_id => owner.id, :actor_type => owner.class.to_s, :role => 'admin' }
end
end
end
end