Sha256: b5452d261442ab4e78bc6880c620560ba799115c76a21847c4116d9d3fc6522e

Contents?: true

Size: 697 Bytes

Versions: 45

Compression:

Stored size: 697 Bytes

Contents

module Dryml
  class Railtie
    class PageTagResolver < ActionView::Resolver

      def initialize(controller)
        @controller = controller
        super()
      end

      def find_templates(name, prefix, partial, details)
        tag_name = @controller.dryml_fallback_tag || name.dasherize + '-page'
        method_name = tag_name.to_s.gsub('-', '_')
        if Dryml.empty_page_renderer(@controller.view_context).respond_to?(method_name)
          [ActionView::Template.new('', Dryml.page_tag_identifier(@controller.controller_path, tag_name),
                                    Dryml::Railtie::TemplateHandler, details)]
        else
          []
        end
      end

   end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
dryml-2.0.1 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre10 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre9 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre8 lib/dryml/railtie/page_tag_resolver.rb
dryml-1.3.3 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre7 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre6 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre5 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre4 lib/dryml/railtie/page_tag_resolver.rb
dryml-1.3.2 lib/dryml/railtie/page_tag_resolver.rb
dryml-1.3.1 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre3 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre2 lib/dryml/railtie/page_tag_resolver.rb
dryml-2.0.0.pre1 lib/dryml/railtie/page_tag_resolver.rb
dryml-1.4.0.pre8 lib/dryml/railtie/page_tag_resolver.rb
dryml-1.4.0.pre7 lib/dryml/railtie/page_tag_resolver.rb
dryml-1.4.0.pre6 lib/dryml/railtie/page_tag_resolver.rb
dryml-1.4.0.pre5 lib/dryml/railtie/page_tag_resolver.rb
dryml-1.4.0.pre4 lib/dryml/railtie/page_tag_resolver.rb