Module: Wicked::Controller::Concerns::Steps::ClassMethods
- Defined in:
- lib/wicked/controller/concerns/steps.rb
Instance Method Summary collapse
Instance Method Details
#check_protected!(wizard_steps) ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/wicked/controller/concerns/steps.rb', line 58 def check_protected!(wizard_steps) string_steps = wizard_steps.map(&:to_s) if protected_step = PROTECTED_STEPS.detect { |protected| string_steps.include?(protected) } msg = "Protected step detected: '#{protected_step}' is used internally by Wicked please rename your step" raise WickedProtectedStepError, msg end end |
#steps(*args) ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/wicked/controller/concerns/steps.rb', line 49 def steps(*args) = args. steps = args check_protected!(steps) prepend_before_filter() do self.steps = steps end end |