Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove attr_readers setting by default

  • Loading branch information...
commit 34a4e90e17a2e75a9ec8a146ec0be17b884b423f 1 parent e4ab18a
Jeremy Bush zombor authored
Showing with 0 additions and 7 deletions.
  1. +0 −7 lib/stache/handler.rb
7 lib/stache/handler.rb
View
@@ -21,7 +21,6 @@ def compile(template)
mustache.view = self
mustache.template = '#{template.source.gsub(/'/, "\\\\'")}'
mustache.virtual_path = '#{template.virtual_path.to_s}'
- mustache[:yield] = content_for(:layout)
mustache.context.update(local_assigns)
variables = controller.instance_variable_names
variables -= %w[@template]
@@ -34,12 +33,6 @@ def compile(template)
mustache.instance_variable_set(name, controller.instance_variable_get(name))
end
- # Declaring an +attr_reader+ for each instance variable in the
- # Stache::View subclass makes them available to your templates.
- mustache.class.class_eval do
- attr_reader *variables.map { |name| name.sub(/^@/, '').to_sym }
- end
-
mustache.render.html_safe
MUSTACHE
end
Please sign in to comment.
Something went wrong with that request. Please try again.