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.6.0 lib/avo/concerns/visible_items.rb
avo-3.5.8 lib/avo/concerns/visible_items.rb
avo-3.5.7 lib/avo/concerns/visible_items.rb
avo-3.5.6 lib/avo/concerns/visible_items.rb
avo-3.5.6.beta1 lib/avo/concerns/visible_items.rb
avo-3.5.5 lib/avo/concerns/visible_items.rb
avo-3.5.4 lib/avo/concerns/visible_items.rb
avo-3.5.3 lib/avo/concerns/visible_items.rb
avo-3.5.2 lib/avo/concerns/visible_items.rb
avo-3.5.1 lib/avo/concerns/visible_items.rb
avo-3.5.0 lib/avo/concerns/visible_items.rb
avo-3.4.4 lib/avo/concerns/visible_items.rb
avo-3.4.3 lib/avo/concerns/visible_items.rb
avo-3.4.2 lib/avo/concerns/visible_items.rb
avo-3.4.1 lib/avo/concerns/visible_items.rb
avo-3.4.0 lib/avo/concerns/visible_items.rb
avo-3.3.6 lib/avo/concerns/visible_items.rb
avo-3.3.5 lib/avo/concerns/visible_items.rb
avo-3.3.4 lib/avo/concerns/visible_items.rb
avo-3.3.3 lib/avo/concerns/visible_items.rb