Sha256: 8e3540dea566df4d97f01b40723e29f49dcf4c3e5a1d76ca477a5913086cb798

Contents?: true

Size: 813 Bytes

Versions: 6

Compression:

Stored size: 813 Bytes

Contents

require 'ample_assets/configuration'
require 'ample_assets/plugin_methods'

module AmpleAssets
  require 'ample_assets/engine' if defined?(Rails)
  extend Configuration
  class << self

    # hooks AmpleAssets::ViewHelpers into ActionView::Base
    def enable_actionpack
      return if ActionView::Base.instance_methods.include? :asset_drop
      require 'ample_assets/view_helper'
      require 'ample_assets/form_helper'
      require 'ample_assets/form_builder'
      ActionView::Base.send :include, ViewHelper
      ActionView::Base.send :include, AmpleAssets::FormHelper
      ActionView::Helpers::FormBuilder.send :include, AmpleAssets::FormBuilder
    end

  end
end

if defined? Rails
  AmpleAssets.enable_actionpack if defined? ActionController
  ActiveRecord::Base.extend AmpleAssets::PluginMethods
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ample_assets-0.0.7 lib/ample_assets.rb
ample_assets-0.0.6 lib/ample_assets.rb
ample_assets-0.0.4 lib/ample_assets.rb
ample_assets-0.0.3 lib/ample_assets.rb
ample_assets-0.0.2 lib/ample_assets.rb
ample_assets-0.0.1 lib/ample_assets.rb