/ip_addresses: fix 'missing attribute: model_id' error
Fix crash on /ip_addresses page when using the group by option. Caused by attempting to include model_id in the data attributes when it isn't present when using this option. Fix is to only include attributes that are actually present.
This commit is contained in:
@@ -42,4 +42,8 @@ class IpAddress < ApplicationRecord
|
|||||||
def readonly?
|
def readonly?
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def html_data_attributes
|
||||||
|
super & attributes.keys.map(&:to_sym)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user