Skip to content

Instantly share code, notes, and snippets.

@rbarazi
Created April 2, 2010 18:19
Show Gist options
  • Select an option

  • Save rbarazi/353497 to your computer and use it in GitHub Desktop.

Select an option

Save rbarazi/353497 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 8-4. The updated new comment template in app/views/comments/new.js.erb
$("<%= escape_javascript render(:file => 'comments/new.html.erb') %>").insertAfter('#comments');
$('#new_comment').slideDown();
$('#new_comment_link').hide();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment