spec/dummy/app/controllers/products_controller.rb
# Only allow a trusted parameter "white list" through.

Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .
def product_params
      if Bread.rails3?
        params[:product]
      else
        params.require(:product).permit(:name, :category_id)
      end
    end
def product_params if Bread . rails3? params [ :product ] else params . require ( :product ) . permit ( :name , :category_id ) end end
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .