Sha256: f11f5da208ebe3fa738fe44ff980125502dd66370606c476388ab735ddfa49e7

Contents?: true

Size: 276 Bytes

Versions: 9

Compression:

Stored size: 276 Bytes

Contents

<% if @comment.new_record? %>
  $('form#comment').replaceWith('<%= escape_javascript(render(:partial => "form")) %>');
<% else %>
  $('form#comment')[0].reset();
  $('#comments').append('<%= escape_javascript(render(:partial => "comment", :object => @comment)) %>');
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
comfy_blog-0.1.8 app/views/blog/comments/create.js.erb
comfy_blog-0.1.7 app/views/blog/comments/create.js.erb
comfy_blog-0.1.6 app/views/blog/comments/create.js.erb
comfy_blog-0.1.5 app/views/blog/comments/create.js.erb
comfy_blog-0.1.4 app/views/blog/comments/create.js.erb
comfy_blog-0.1.3 app/views/blog/comments/create.js.erb
comfy_blog-0.1.2 app/views/blog/comments/create.js.erb
comfy_blog-0.1.1 app/views/blog/comments/create.js.erb
comfy_blog-0.1.0 app/views/blog/comments/create.js.erb