Refactor fixes
This commit is contained in:
@@ -98,7 +98,7 @@ class SupplierController < ApplicationController
|
||||
|
||||
# POST /orders/1/is_being_processed
|
||||
def mark_order_in_process
|
||||
@order = Order.find_by_supplier_id_and_id(current_supplier.id, params[:order_id])
|
||||
@order = Order.find_by_supplier_id_and_id!(current_supplier.id, params[:order_id])
|
||||
@order.is_being_processed!
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ class Order
|
||||
}
|
||||
}], reduce_function: '_sum'
|
||||
|
||||
#view :by_supplier_id_and_id, key: [:supplier_id, :_id]
|
||||
view :by_supplier_id_and_id, key: [:supplier_id, :_id] # Do not comment me out
|
||||
|
||||
# Return all currently active orders for a given supplier
|
||||
def self.active_for_supplier(supplier_id)
|
||||
|
||||
@@ -53,7 +53,7 @@ script#products-category-template[type="text/html"]= mustache_template 'user/pro
|
||||
products: category.products,
|
||||
include_order_buttons: false
|
||||
}
|
||||
result_html = Mustache.to_html($('#products-category-template').html(), obj)
|
||||
result_html = Handlebars.compile($('#products-category-template').html())(obj)
|
||||
body.append(result_html)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user