lib/avo/fields/has_base_field.rb in avo-3.3.5 vs lib/avo/fields/has_base_field.rb in avo-3.3.6

- old
+ new

@@ -1,10 +1,11 @@ module Avo module Fields class HasBaseField < BaseField include Avo::Fields::Concerns::IsSearchable include Avo::Fields::Concerns::UseResource + include Avo::Fields::Concerns::ReloadIcon attr_accessor :display attr_accessor :scope attr_accessor :attach_scope attr_accessor :description @@ -12,19 +13,19 @@ attr_accessor :hide_search_input attr_reader :link_to_child_resource def initialize(id, **args, &block) super(id, **args, &block) - @scope = args[:scope].present? ? args[:scope] : nil @attach_scope = args[:attach_scope].present? ? args[:attach_scope] : nil @display = args[:display].present? ? args[:display] : :show @searchable = args[:searchable] == true @hide_search_input = args[:hide_search_input] || false @description = args[:description] @use_resource = args[:use_resource] || nil @discreet_pagination = args[:discreet_pagination] || false @link_to_child_resource = args[:link_to_child_resource] || false + @reloadable = args[:reloadable].present? ? args[:reloadable] : false end def field_resource resource || get_resource_by_model_class(@record.class) end