ActionController::ParameterMissing (param not found: order)
parameters, ruby, ruby-on-rails
Solution
For you to use `params.require(:order)`. the incoming parameters should be something like `{"order"=>...}`
Check the documentation at http://edgeapi.rubyonrails.org/classes/ActionController/StrongParameters.html to use Strong Parameters,.
Based on your information about the key-value pairs used, there is no key called "order" in the incoming-data. That's the reason - its failing.
Hope, this helps
Problem
I am trying to send a post request using the Postman chrome extension to my Ruby on Rails app, but i keep getting the error ``` ActionController::ParameterMissing (param not found: order): app/controllers/orders_controller.rb:27:in order_params' app/controllers/orders_controller.rb:20:in create ``` The code in my orders_controller is ``` class OrdersController < ApplicationController protect_from_forgery :except => :create def new @order = Order.new end def index @orders = Order.all end def show @order = Order.find(params[:id]) end def create @order = Order.new(order_params) render text: params[:product] end private def order_params params.require(:order).permit(:product) end end ``` My key Value pairs to the Postman extension are `product[product_name]` `Samsung`