Sha256: 03a1c18630ba7f3dfd93677064a572f30ab7006b57186070492f3fa8a23d655a

Contents?: true

Size: 921 Bytes

Versions: 7

Compression:

Stored size: 921 Bytes

Contents

# This file contains VersionStrategies for the Cell and Cells module for Rails >= 3.1.
module Cell
  Layouts = ActionView::Layouts

  # Methods to be included in Cell::Rails in 3.1 context.
  module VersionStrategy
    extend ActiveSupport::Concern

    include AbstractController::UrlFor  # must be included before _routes is set in Railstie. # TODO: remove that.


    module ClassMethods
      def helper_modules
        [_routes.url_helpers, _routes.mounted_helpers, _helpers]
      end
    end

  private
    def process_opts_for(opts, state)
      opts[:action] = opts[:view] || state

      lookup_context.formats = [opts.delete(:format)] if opts[:format]
    end
  end
end


module Cells
  module Engines
    module VersionStrategy
      def registered_engines
        ::Rails::Engine::Railties.new
      end

      def existent_directories_for(path)
        path.existent_directories
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cells-3.11.3 lib/cell/rails4_1_strategy.rb
cells-3.11.2 lib/cell/rails4_1_strategy.rb
cells-3.11.1 lib/cell/rails4_1_strategy.rb
cells-3.11.0 lib/cell/rails4_1_strategy.rb
cells-3.10.1 lib/cell/rails4_1_strategy.rb
cells-3.10.0 lib/cell/rails4_1_strategy.rb
cells-3.9.1 lib/cell/rails4_1_strategy.rb