Sha256: e913e66204821ba1dc3ef18e652975572ca4663620cd0bad29cb6d80faeecfd9

Contents?: true

Size: 546 Bytes

Versions: 21

Compression:

Stored size: 546 Bytes

Contents

require 'ecm/cms/database_resolver'

module Ecm
  module Cms
    class PartialResolver < ::ActionView::Resolver
      require 'singleton'
      include Singleton

      # add shared behaviour for database backed templates
      include Ecm::Cms::DatabaseResolver

      def template_class
        'Ecm::Cms::Partial'
      end

      def build_source(record)
        record.body
      end

      def normalize_basename(basename)
        '_' << basename
      end

      def resolve(partial_flag)
        partial_flag
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
ecm_cms-0.0.1.pre lib/ecm/cms/resolvers/ecm/cms/partial_resolver.rb