mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 06:56:23 +02:00
Fixed codeclimate issues and removed unnecessary files
This commit is contained in:
parent
f59c6ee5c3
commit
d50c3f0b45
12 changed files with 12 additions and 105 deletions
|
@ -3,7 +3,10 @@ class Action < ApplicationRecord
|
|||
|
||||
belongs_to :user
|
||||
belongs_to :contact, optional: true
|
||||
has_many :subactions, class_name: 'Action', foreign_key: 'bulk_action_id', dependent: :destroy
|
||||
has_many :subactions, class_name: 'Action',
|
||||
foreign_key: 'bulk_action_id',
|
||||
inverse_of: :action,
|
||||
dependent: :destroy
|
||||
belongs_to :bulk_action, class_name: 'Action', optional: true
|
||||
|
||||
validates :operation, inclusion: { in: proc { |action| action.class.valid_operations } }
|
||||
|
@ -36,3 +39,4 @@ class Action < ApplicationRecord
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue