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.13.6 lib/avo/concerns/visible_items.rb
avo-3.13.5 lib/avo/concerns/visible_items.rb
avo-3.13.4 lib/avo/concerns/visible_items.rb
avo-3.13.3 lib/avo/concerns/visible_items.rb
avo-3.13.2 lib/avo/concerns/visible_items.rb
avo-3.13.1 lib/avo/concerns/visible_items.rb
avo-3.13.0 lib/avo/concerns/visible_items.rb
avo-3.12.0 lib/avo/concerns/visible_items.rb
avo-3.11.10 lib/avo/concerns/visible_items.rb
avo-3.11.9 lib/avo/concerns/visible_items.rb
avo-3.11.8 lib/avo/concerns/visible_items.rb
avo-3.11.7 lib/avo/concerns/visible_items.rb
avo-3.11.6 lib/avo/concerns/visible_items.rb
avo-3.11.5 lib/avo/concerns/visible_items.rb
avo-3.11.4 lib/avo/concerns/visible_items.rb
avo-3.11.3 lib/avo/concerns/visible_items.rb
avo-3.11.2 lib/avo/concerns/visible_items.rb
avo-3.11.1 lib/avo/concerns/visible_items.rb
avo-3.11.0 lib/avo/concerns/visible_items.rb
avo-3.10.10 lib/avo/concerns/visible_items.rb