Skip to content

Commit

Permalink
fix for rails 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Apr 18, 2012
1 parent 8464f7d commit 8fdae2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/smt_rails/mustache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
module SmtRails
module Mustache
def self.call(template)
if template.locals.include? SmtRails.action_view_key
"Mustache.render(#{template.source.inspect}, #{SmtRails.action_view_key}).html_safe"
if template.locals.include? SmtRails.action_view_key.to_s || template.locals.include? SmtRails.action_view_key.to_sym
"Mustache.render(#{template.source.inspect}, #{SmtRails.action_view_key.to_s}).html_safe"
else
"#{template.source.inspect}.html_safe"
end
Expand Down

0 comments on commit 8fdae2a

Please sign in to comment.