[#345] temporaly fix error with mass-assign protected attributes
This commit is contained in:
parent
bfc64162e1
commit
8ff7ae6870
|
@ -3,6 +3,8 @@ module Owner
|
|||
|
||||
included do
|
||||
validates :owner, presence: true
|
||||
after_create -> { relations.create actor_id: owner.id, actor_type: owner.class.to_s, role: 'admin' }
|
||||
after_create do
|
||||
relations.create({ actor_id: owner.id, actor_type: owner.class.to_s, role: 'admin' }, without_protection: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue