创建产品并使用 wicked gem 更新对象后,日志正在吐出
在重定向到参数变为空的步骤上。有人知道为什么吗?
[object Object]
HTTP_REFERER http://localhost:3000/products/new?
params null
utf8 ✓
def create
@product = current_user.products.build(params[:product])
if @product.save
redirect_to product_step_path(@product, Product.form_steps.first, only_path: true, format: :html)
else
render :new, format: :html
end
end
class Product::StepsController < ApplicationController
include Wicked::Wizard
steps *Product.form_steps
def show
@product = Product.find(params[:product_id])
render_wizard
end
end