Skip to content

Instantly share code, notes, and snippets.

@d3chapma
Created February 27, 2012 15:59
Show Gist options
  • Save d3chapma/1924919 to your computer and use it in GitHub Desktop.
Save d3chapma/1924919 to your computer and use it in GitHub Desktop.
Javascript and Haml
- variables = { :contact_first_name => @contact.first_name, :user_full_name => @user.name, :user_first_name => @user.first_name }
= @email.intro_html(variables)
%p= "Please click the link below to go directly to the results of #{@user.first_name}'s assessment. You can also access an analysis of that assessment from that page."
%p= share_results_url(@token)
= @email.conclusion_html(variables)
$('#launch_share_results .preview .mail_content').html('<p>Hi Jane,</p>
<p>John Smith has taken a 360(deg) <span style="color:red;"><strong>No such variable available!</strong></span> assessment through myLAUNCHtools.com and would like to share the results with you.</p>
<p>Please click the link below to go directly to the results of John's assessment. You can also access an analysis of that assessment from that page.</p>
<p>http://lvh.me:3000/assessments/results/1</p>
<p>Thank you in advance for your time and interest in John&#8217;s leadership.</p>
<p>Sincerely,<br />
Launcha</p>
');
$('#<%= @email.unique_name %> .preview .mail_content').html('<%=j render( :file => "user_mailer/#{@email.key}") %>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment