This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/lib/wizard/step.rb

19 lines
298 B
Ruby
Raw Normal View History

2016-08-25 13:14:56 -04:00
class Wizard
class Step
attr_reader :id
attr_accessor :index, :fields, :next, :previous
def initialize(id)
@id = id
@fields = []
end
def add_field(attrs)
field = Field.new(attrs)
field.step = self
@fields << field
field
end
end
end