Skip to content

Instantly share code, notes, and snippets.

@wanghq
Created November 14, 2012 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wanghq/4070421 to your computer and use it in GitHub Desktop.
Save wanghq/4070421 to your computer and use it in GitHub Desktop.
invitations/create.js.erb
<% if @invitaion.valid? %>
window.location.replace("<%= signin_url %>")
<% else %>
var modal = "<%= render(:partial => 'invitations/form', :locals => {:invitation => @invitation) %>";
$('#signin-modal').html($(modal));
<% end %>
@mcbsys
Copy link

mcbsys commented Nov 16, 2012

Fixed a couple brackets on the var line:

<% if @invitaion.valid? %>
  window.location.replace("<%= signin_url %>")
<% else %>
  var modal = "<%= render :partial => 'invitations/form', :locals => { :invitation => @invitation } %>";
  $('#signin-modal').html($(modal));
<% end %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment