Sha256: 271493b3d9b372484e24d46b13871e8798b2ac82b6145596a4791ab40aabfe4a

Contents?: true

Size: 479 Bytes

Versions: 3

Compression:

Stored size: 479 Bytes

Contents

# encoding: utf-8

module PagesSphinx
  module PageExtension
    extend ActiveSupport::Concern

    included do
      after_save ThinkingSphinx::RealTime.callback_for(:page)
    end

    def localization_values
      localizations.map(&:value)
    end

    def category_names
      categories.map(&:name)
    end

    def file_names
      files.map(&:name)
    end

    def file_filenames
      files.map(&:filename)
    end

    def published
      published?
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pages_sphinx-0.0.4 lib/pages_sphinx/page_extension.rb
pages_sphinx-0.0.3 lib/pages_sphinx/page_extension.rb
pages_sphinx-0.0.2 lib/pages_sphinx/page_extension.rb