Sha256: 517a631a0a33bbcb6deb3717ed1e28c1af9b85e935524c7550e47ff337238ff8

Contents?: true

Size: 732 Bytes

Versions: 62

Compression:

Stored size: 732 Bytes

Contents

module Workarea
  module Search
    class Admin
      # This class exists to represent system content (as opposed to content
      # pages defined in Content::Page). Content will only get indexed in the
      # Admin index in this case.
      #
      class Content < Search::Admin
        include Admin::Releasable

        def should_be_indexed?
          model.system?
        end

        def type
          'system_page'
        end

        def jump_to_text
          model.name
        end

        def jump_to_position
          6
        end

        def jump_to_route_helper
          'content_path'
        end

        def search_text
          "system content page #{model.name}"
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.4.13 app/models/workarea/search/admin/content.rb
workarea-core-3.4.12 app/models/workarea/search/admin/content.rb