Refactoring of order comments.

This commit is contained in:
benni 2011-06-19 20:47:27 +02:00
parent 38b5dcba1f
commit 88b268cb0b
14 changed files with 57 additions and 47 deletions

View file

@ -0,0 +1,5 @@
= simple_form_for order_comment, :remote => true, :validate => true do |f|
= f.hidden_field :order_id
= f.hidden_field :user_id
= f.input :text, :input_html => {:size => "50x6"}
= f.submit

View file

@ -0,0 +1 @@
$('#comments').html('<%= escape_javascript(render(:partial => 'shared/comments', :locals => { :comments => @order_comment.order.comments })) %>');

View file

@ -0,0 +1 @@
$('#new_comment').html('<%= escape_javascript(render('form', :locals => { :order_comment => @order_comment})) %>');