Class: OrderCommentsController
Instance Method Summary
collapse
current
Methods included from PathHelper
#finance_group_transactions_path
Instance Method Details
#create ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'app/controllers/order_comments_controller.rb', line 7
def create
@order_comment = OrderComment.new(params[:order_comment])
if @order_comment.save
render layout: false
else
render action: :new, layout: false
end
end
|
#new ⇒ Object
2
3
4
5
|
# File 'app/controllers/order_comments_controller.rb', line 2
def new
@order = Order.find(params[:order_id])
@order_comment = @order..build(user: current_user)
end
|