mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
Fixed inverse_of issues
This commit is contained in:
parent
d50c3f0b45
commit
392e284463
2 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,7 @@ class Action < ApplicationRecord
|
|||
belongs_to :contact, optional: true
|
||||
has_many :subactions, class_name: 'Action',
|
||||
foreign_key: 'bulk_action_id',
|
||||
inverse_of: :action,
|
||||
inverse_of: :bulk_action,
|
||||
dependent: :destroy
|
||||
belongs_to :bulk_action, class_name: 'Action', optional: true
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ class RegistrantUser < User
|
|||
def last_name
|
||||
username.split.second
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
def update_related_contacts
|
||||
grouped_contacts = Contact.where(ident: ident, ident_country_code: country.alpha2)
|
||||
|
@ -126,7 +127,8 @@ class RegistrantUser < User
|
|||
registrar.notify(bulk_action || action)
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
||||
class << self
|
||||
def find_or_create_by_api_data(user_data = {})
|
||||
return false unless user_data[:ident]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue