Skip to content

Commit 1a3e1f0

Browse files
committed
Make the message actually render properly.
I wasn't properly passing locals into haml.
1 parent 85eb4d3 commit 1a3e1f0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

models/notifier.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def self.send_message_notification(recipient, who)
1010
private
1111

1212
def self.render_haml_template(template, who)
13-
engine = Haml::Engine.new(File.open("views/notifier/#{template}.haml", "rb").read, :who => who)
14-
engine.render
13+
engine = Haml::Engine.new(File.open("views/notifier/#{template}.haml", "rb").read)
14+
engine.render(Object.new, :who => who)
1515
end
1616
end
1717

views/notifier/message.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Hey there! You have a new message on the Hackety Hack site from #{@who}! You can check it out here:
1+
Hey there! You have a new message on the Hackety Hack site from #{who}! You can check it out here:
22

33
http://hackety-hack.com/messages
44

0 commit comments

Comments
 (0)