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.16.4 lib/avo/concerns/visible_items.rb
avo-3.16.3 lib/avo/concerns/visible_items.rb
avo-3.16.2 lib/avo/concerns/visible_items.rb
avo-3.16.1 lib/avo/concerns/visible_items.rb
avo-3.16.0 lib/avo/concerns/visible_items.rb
avo-3.15.7 lib/avo/concerns/visible_items.rb
avo-3.15.6 lib/avo/concerns/visible_items.rb
avo-3.15.5 lib/avo/concerns/visible_items.rb
avo-3.15.4 lib/avo/concerns/visible_items.rb
avo-3.15.3 lib/avo/concerns/visible_items.rb
avo-3.15.2 lib/avo/concerns/visible_items.rb
avo-3.15.1 lib/avo/concerns/visible_items.rb
avo-3.15.0 lib/avo/concerns/visible_items.rb
avo-3.14.5 lib/avo/concerns/visible_items.rb
avo-3.14.4 lib/avo/concerns/visible_items.rb
avo-3.14.3 lib/avo/concerns/visible_items.rb
avo-3.14.2 lib/avo/concerns/visible_items.rb
avo-3.14.1 lib/avo/concerns/visible_items.rb
avo-3.14.0 lib/avo/concerns/visible_items.rb
avo-3.13.7 lib/avo/concerns/visible_items.rb