lib/stache/mustache/handler.rb in stache-1.1.1 vs lib/stache/mustache/handler.rb in stache-1.2.0

- old
+ new

@@ -36,10 +36,12 @@ mustache.virtual_path = '#{virtual_path}' mustache[:yield] = content_for(:layout) mustache.context.push(local_assigns) variables = controller.instance_variables variables.delete(:@template) - variables -= controller.class.protected_instance_variables.to_a + if controller.class.respond_to?(:protected_instance_variables) + variables -= controller.class.protected_instance_variables.to_a + end variables.each do |name| mustache.instance_variable_set(name, controller.instance_variable_get(name)) end