-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.rb
22 lines (17 loc) · 816 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'juggernaut'
require 'juggernaut_helper'
# ActionView::Helpers::AssetTagHelper::register_javascript_include_default('juggernaut')
# ActionView::Helpers::AssetTagHelper::register_javascript_include_default('swfobject')
ActionView::Base.send(:include, Juggernaut::JuggernautHelper)
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :juggernaut => [
'juggernaut/swfobject', 'juggernaut/jquery.juggernaut.js', 'juggernaut/jquery.json.js']
ActionController::Base.class_eval do
alias_method :render_without_juggernaut, :render
include Juggernaut::RenderExtension
alias_method :render, :render_with_juggernaut
end
ActionView::Base.class_eval do
alias_method :render_without_juggernaut, :render
include Juggernaut::RenderExtension
alias_method :render, :render_with_juggernaut
end