lib/avo/base_resource.rb in avo-3.5.6.beta1 vs lib/avo/base_resource.rb in avo-3.5.6
- old
+ new
@@ -292,10 +292,14 @@
def fetch_cards
cards
end
+ def divider
+ action DividerComponent
+ end
+
# def fields / def cards
[:fields, :cards].each do |method_name|
define_method method_name do
# Empty method
end
@@ -308,11 +312,11 @@
define_method plural_entity do
# blank entity method
end
# def action / def filter / def scope
- define_method entity do |entity_class, arguments: {}|
- entity_loader(entity).use({class: entity_class, arguments: arguments})
+ define_method entity do |entity_class, arguments: {}, icon: nil|
+ entity_loader(entity).use({class: entity_class, arguments: arguments, icon: icon}.compact)
end
# def get_actions / def get_filters / def get_scopes
define_method "get_#{plural_entity}" do
return entity_loader(entity).bag if entity_loader(entity).present?