app/models/c80_estate/owner.rb in c80_estate-0.1.0.1 vs app/models/c80_estate/owner.rb in c80_estate-0.1.0.2
- old
+ new
@@ -36,9 +36,11 @@
has_many :assigned_areas, :as => :assigned_person, :class_name => 'C80Estate::Area', :dependent => :nullify
# эта взаимосвязь трактуется, как "площадь, назначенная сотруднику"
has_many :assigned_properties, :as => :assigned_person, :class_name => 'C80Estate::Property', :dependent => :nullify
+ has_many :sevents, :as => :auser, :class_name => 'C80Estate::Sevent', :dependent => :nullify
+
after_create :create_role
def create_role
# Rails.logger.debug('<Owner.create_role>')
r = C80Estate::Role.create({ role_type_id: nil })
\ No newline at end of file