Refactoring of order comments.
This commit is contained in:
parent
38b5dcba1f
commit
88b268cb0b
14 changed files with 57 additions and 47 deletions
5
app/views/order_comments/_form.html.haml
Normal file
5
app/views/order_comments/_form.html.haml
Normal 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
|
||||
1
app/views/order_comments/create.js.erb
Normal file
1
app/views/order_comments/create.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
$('#comments').html('<%= escape_javascript(render(:partial => 'shared/comments', :locals => { :comments => @order_comment.order.comments })) %>');
|
||||
1
app/views/order_comments/new.js.erb
Normal file
1
app/views/order_comments/new.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
$('#new_comment').html('<%= escape_javascript(render('form', :locals => { :order_comment => @order_comment})) %>');
|
||||
Loading…
Add table
Add a link
Reference in a new issue