lib/rails_view.rb in rails_view-2.2.0 vs lib/rails_view.rb in rails_view-2.3.0
- old
+ new
@@ -1,10 +1,10 @@
require 'rails' unless defined?(::Rails)
require 'action_controller' unless defined?(::ActionController)
class View
- VERSION = '2.2.0'
+ VERSION = '2.3.0'
def View.version
View::VERSION
end
@@ -68,9 +68,16 @@
block ? controller.instance_eval(&block) : controller
end
end
def View.render(*args)
+ options = args.extract_options!.to_options!
+ args.push(options)
+
+ unless options.has_key?(:layout)
+ options[:layout] = false
+ end
+
Array(View.controller{ render(*args) }).join.html_safe
end
end
Rails_view = ::View