lib/avo/concerns/has_items.rb in avo-3.0.0.pre18 vs lib/avo/concerns/has_items.rb in avo-3.0.0.pre19
- old
+ new
@@ -28,14 +28,10 @@
def tool(klass, **args)
deprecated_dsl_api __method__, "fields"
end
- def heading(body, **args)
- deprecated_dsl_api __method__, "fields"
- end
-
def sidebar(**args, &block)
deprecated_dsl_api __method__, "fields"
end
# END DSL methods
end
@@ -271,10 +267,10 @@
true
end
end
.select do |item|
# On location field we can have field coordinates and setters with different names like latitude and longitude
- if !item.is_a?(Avo::Fields::LocationField) && !item.is_heading? && view.in?([:edit, :update, :new, :create])
+ if !item.is_a?(Avo::Fields::LocationField) && !item.is_heading? && view.in?(%w[edit update new create])
if item.respond_to?(:id)
item.resource.record.respond_to?("#{item.id}=")
else
true
end