Sha256: b0d6a007ae3d9b7e3639fb8c43376768a0509ce2d4c37d3a507c6f281d72e265

Contents?: true

Size: 351 Bytes

Versions: 5

Compression:

Stored size: 351 Bytes

Contents

class Company < ActiveRecord::Base
  has_steps :current_step_column => :my_step, :steps => ["step1", "step2", "step3"]

  private

    def validate_step1
      self.validates_presence_of :name
    end

    def validate_step2
      self.validates_numericality_of :code
    end

    def validate_step3
      self.validates_presence_of :city
    end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stepper-0.2.0 test/rails_app/app/models/company.rb
stepper-0.1.0 test/rails_app/app/models/company.rb
stepper-0.0.4 test/rails_app/app/models/company.rb
stepper-0.0.3 test/rails_app/app/models/company.rb
stepper-0.0.1 test/rails_app/app/models/company.rb