Sha256: 8186253ba817317f0f383f1c74923c2bf43e77e5d9088d6b63af5fe3ecab92a6
Contents?: true
Size: 914 Bytes
Versions: 97
Compression:
Stored size: 914 Bytes
Contents
module Avo class BaseResourceTool include Avo::Concerns::IsResourceItem include Avo::Fields::FieldExtensions::VisibleInDifferentViews class_attribute :name class_attribute :partial class_attribute :item_type, default: :tool attr_accessor :params attr_accessor :resource attr_accessor :view def initialize(**args) # Set the visibility show_on Avo.configuration.resource_default_view show_on args[:show_on] if args[:show_on].present? hide_on args[:hide_on] if args[:hide_on].present? only_on args[:only_on] if args[:only_on].present? except_on args[:except_on] if args[:except_on].present? end def hydrate(view: nil) @view = view if view.present? self end def partial return self.class.partial if self.class.partial.present? "avo/resource_tools/#{self.class.to_s.underscore}" end end end
Version data entries
97 entries across 97 versions & 1 rubygems