20 Feb '12, 5am

@rbates I would love to see episode 217 (multistep forms) revised should you run out of suggestions..

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.current_step = steps[steps.index(current_step)-1] end def first_step? current_step == steps.first end def last_step? current_step == steps.last end def all_valid? steps.all? do |step| self.current_step = step valid? end end

Full article: http://railscasts.com/episodes/217-multistep-forms

Tweets

@a1extran If you love running tests, you'll lov...

railscasts.com 19 Feb '12, 9pm

guard 'livereload' do watch(%r{app/.+\.(erb|haml)}) watch(%r{app/helpers/.+\.rb}) watch(%r{public/.+\.(css|js|html)}) watc...

“Railscasts - Time Zones in Rails 2.1”

railscasts.com 20 Feb '12, 11am

In the past, time zones have been very difficult to work with, but no longer! Rails 2.1 brings with it great time zone sup...

Railscasts - Update through Checkboxes:

railscasts.com 12 Feb '12, 10pm

Jul 02, 2007 | 10 minutes | Views , Controllers , Forms See how to select multiple items using checkboxes and perform an a...