【发布时间】:2017-07-31 10:22:11
【问题描述】:
创建产品并使用 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
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-4 wicked-gem