Sha256: c533c7e75b990ac3e333bac2c625b7ba18a9e29a0a33c505b8d31f6eb4cc1cb4

Contents?: true

Size: 506 Bytes

Versions: 5

Compression:

Stored size: 506 Bytes

Contents

# Not yet used! Should use it?

module Cream
  # Include helpers in the given scope to AC and AV.
  # "Borrowed" from devise
  def self.include_helpers(scope)
    ActiveSupport.on_load(:action_controller) do
      include scope::Helpers
      include scope::UrlHelpers
    end

    ActiveSupport.on_load(:action_view) do
      include scope::UrlHelpers
    end
  end

  class Engine < ::Rails::Engine
    initializer "cream.helpers" do
      Cream.include_helpers(Cream::Controllers)
    end    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cream-0.9.2 lib/cream/configure/engine.rb
cream-0.9.1 lib/cream/configure/engine.rb
cream-0.9.0 lib/cream/configure/engine.rb
cream-0.8.9.3 lib/cream/configure/engine.rb
cream-0.8.9.2 lib/cream/configure/engine.rb