我有一个竞选模型,我正在使用邪恶的宝石一步一步地创建竞选。我在巫师里面一共有三步…steps :details, :audiance, :creatives这是我的向导控制器class Brands::CampaignWizardsController < Brands::ApplicationController include Wicked::Wizard steps :details, :audiance, :creatives def show @campaign = current_company.campaigns.friendly.find(params[:campaign_id]) render_wizard end def update case step when :details @campaign.attributes = campaign_details_params @campaign[:dos].delete_if(&:blank?) @campaign[:donts].delete_if(&:blank?) @campaign_ideas = CampaignIdea.where(objective_id: @campaign.objective_id) when :audiance @campaign.attributes = campaign_audiance_params @campaign[:influencer_interests].delete_if(&:blank?) when :creatives @campaign.attributes = campaign_creatives_params end render_wizard @campaign endend我想在向导的每个步骤中添加flash消息(成功/错误)。有没有办法将我的消息作为{}选项传递给呈现向导? 最佳答案 你应该能够做到这一点:。
10-01 13:21