Module: Wicked::Controller::Concerns::Path
- Extended by:
- ActiveSupport::Concern
- Included in:
- Action
- Defined in:
- lib/wicked/controller/concerns/path.rb
Instance Method Summary collapse
- #next_wizard_path(options = {}) ⇒ Object
- #previous_wizard_path(options = {}) ⇒ Object
- #wicked_action ⇒ Object
- #wicked_controller ⇒ Object
- #wicked_controller_name ⇒ Object
- #wizard_path(goto_step = nil, options = {}) ⇒ Object
Instance Method Details
#next_wizard_path(options = {}) ⇒ Object
4 5 6 |
# File 'lib/wicked/controller/concerns/path.rb', line 4 def next_wizard_path( = {}) wizard_path(@next_step, ) end |
#previous_wizard_path(options = {}) ⇒ Object
8 9 10 |
# File 'lib/wicked/controller/concerns/path.rb', line 8 def previous_wizard_path( = {}) wizard_path(@previous_step, ) end |
#wicked_action ⇒ Object
20 21 22 |
# File 'lib/wicked/controller/concerns/path.rb', line 20 def wicked_action params[:action] end |
#wicked_controller ⇒ Object
12 13 14 |
# File 'lib/wicked/controller/concerns/path.rb', line 12 def wicked_controller self.class.name.sub(/::\w+$/, '') end |
#wicked_controller_name ⇒ Object
16 17 18 |
# File 'lib/wicked/controller/concerns/path.rb', line 16 def wicked_controller_name wicked_controller.sub(/Controller$/, '').gsub('::', '_').underscore end |
#wizard_path(goto_step = nil, options = {}) ⇒ Object
24 25 26 27 28 |
# File 'lib/wicked/controller/concerns/path.rb', line 24 def wizard_path(goto_step = nil, = {}) id = goto_step || params[:id] path_method = "#{wicked_controller_name}_path" send path_method, id, end |