Sha256: 6c77a2fdae92d437b0710dde26470f344a060f3cdd76924cf88e680c9dd31cff

Contents?: true

Size: 437 Bytes

Versions: 102

Compression:

Stored size: 437 Bytes

Contents

# This concern helps us figure out what items are visible for each tab, panel or sidebar
module Avo
  module Concerns
    module VisibleItems
      extend ActiveSupport::Concern

      included do
        include Avo::Concerns::Hydration
      end

      def visible?
        if respond_to?(:visible_on?)
          visible_on?(view) && visible_items.any?
        else
          visible_items.any?
        end
      end
    end
  end
end

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
avo-3.10.9 lib/avo/concerns/visible_items.rb
avo-3.10.8 lib/avo/concerns/visible_items.rb
avo-3.10.7 lib/avo/concerns/visible_items.rb
avo-3.10.6 lib/avo/concerns/visible_items.rb
avo-3.10.5 lib/avo/concerns/visible_items.rb
avo-3.10.4 lib/avo/concerns/visible_items.rb
avo-3.10.3 lib/avo/concerns/visible_items.rb
avo-3.10.2 lib/avo/concerns/visible_items.rb
avo-3.10.1 lib/avo/concerns/visible_items.rb
avo-3.10.0 lib/avo/concerns/visible_items.rb
avo-3.9.2 lib/avo/concerns/visible_items.rb
avo-3.9.1 lib/avo/concerns/visible_items.rb
avo-3.8.2 lib/avo/concerns/visible_items.rb
avo-3.9.0 lib/avo/concerns/visible_items.rb
avo-3.8.1 lib/avo/concerns/visible_items.rb
avo-3.8.0 lib/avo/concerns/visible_items.rb
avo-3.6.4 lib/avo/concerns/visible_items.rb
avo-3.6.3 lib/avo/concerns/visible_items.rb
avo-3.6.2 lib/avo/concerns/visible_items.rb
avo-3.6.1 lib/avo/concerns/visible_items.rb