Strong parameter does not work when i new model and controller in spree '3-0-stable' and rails 4.2 -
how add new fields spree::pre_order in spree-3.0 + rails4 ?
like old customization: ==========================
app/controllers/spree/api/pre_order_controller
class preordercontroller < spree::api::basecontroller
def create @pre_order = preorder.new(pre_order_params) if @pre_order.save end respond_with(@pre_order) end private def pre_order_params params.require(:pre_order).permit(:user_id,:is_order_created) end
end
i got following error
{ "exception": "param missing or value empty: pre_order" }
please let me know comments.
Comments
Post a Comment