Skip to content

Commit

Permalink
Reverted a change in latest plugin so that it will work in Rails 2.1.…
Browse files Browse the repository at this point in the history
…1 and not

only Edge (via bjeanes)
  • Loading branch information
maccman committed Aug 3, 2009
1 parent ede271e commit d8b7bed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/juggernaut.rb
Expand Up @@ -142,8 +142,12 @@ module InstanceMethods
def render_with_juggernaut(options = nil, extra_options = {}, &block)
if options == :juggernaut or (options.is_a?(Hash) and options[:juggernaut])
begin
@template.send(:_evaluate_assigns_and_ivars)

if @template.respond_to?(:_evaluate_assigns_and_ivars)
@template.send(:_evaluate_assigns_and_ivars)
else
@template.send(:evaluate_assigns)
end

generator = ActionView::Helpers::PrototypeHelper::JavaScriptGenerator.new(@template, &block)
render_for_juggernaut(generator.to_s, options.is_a?(Hash) ? options[:juggernaut] : nil)
ensure
Expand Down

0 comments on commit d8b7bed

Please sign in to comment.