Skip to content

Instantly share code, notes, and snippets.

@akirill0v
Created January 25, 2012 19:31
Show Gist options
  • Save akirill0v/1678072 to your computer and use it in GitHub Desktop.
Save akirill0v/1678072 to your computer and use it in GitHub Desktop.
Include jquery-rails into Engine (Rails 3.x)
require 'rails'
require 'jquery-rails'
$:.unshift File.dirname(__FILE__)
module MyEngine
class Engine < Rails::Engine
if defined?(query::Rails::Engine)
initializer :after_append_asset_paths,
:group => :all,
:after => :append_assets_path do
config.paths.add File.join(::Jquery::Rails::Engine.root.to_s, "vendor", "assets", "javascripts").to_s, :glob => "*"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment