forked from szimek/juggernaut_plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
21 lines (16 loc) · 834 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require File.dirname(__FILE__) + '/lib/juggernaut'
require File.dirname(__FILE__) + '/lib/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/juggernaut']
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