エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
#217 Multistep Forms - RailsCasts
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
#217 Multistep Forms - RailsCasts
attr_writer :current_step validates_presence_of :shipping_name, :if => lambda { |o| o.current_ste... attr_writer :current_step validates_presence_of :shipping_name, :if => lambda { |o| o.current_step == "shipping" } validates_presence_of :billing_name, :if => lambda { |o| o.current_step == "billing" } def current_step @current_step || steps.first end def steps %w[shipping billing confirmation] end def next_step self.current_step = steps[steps.index(current_step)+1] end def previous_step self.curr