Module: Wicked::Controller::Concerns::Path
- Extended by:
- ActiveSupport::Concern
- Included in:
- Wizard
- Defined in:
- lib/wicked/controller/concerns/path.rb
Instance Method Summary collapse
- #next_wizard_path(options = {}) ⇒ Object
- #next_wizard_url(options = {}) ⇒ Object
- #previous_wizard_path(options = {}) ⇒ Object
- #previous_wizard_url(options = {}) ⇒ Object
- #wicked_action ⇒ Object
- #wicked_controller ⇒ Object
- #wizard_path(goto_step = nil, options = {}) ⇒ Object
- #wizard_url(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 |
#next_wizard_url(options = {}) ⇒ Object
8 9 10 |
# File 'lib/wicked/controller/concerns/path.rb', line 8 def next_wizard_url( = {}) wizard_url(@next_step, ) end |
#previous_wizard_path(options = {}) ⇒ Object
12 13 14 |
# File 'lib/wicked/controller/concerns/path.rb', line 12 def previous_wizard_path( = {}) wizard_path(@previous_step, ) end |
#previous_wizard_url(options = {}) ⇒ Object
16 17 18 |
# File 'lib/wicked/controller/concerns/path.rb', line 16 def previous_wizard_url( = {}) wizard_url(@previous_step, ) end |
#wicked_action ⇒ Object
24 25 26 |
# File 'lib/wicked/controller/concerns/path.rb', line 24 def wicked_action params[:action] end |
#wicked_controller ⇒ Object
20 21 22 |
# File 'lib/wicked/controller/concerns/path.rb', line 20 def wicked_controller params[:controller] end |
#wizard_path(goto_step = nil, options = {}) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/wicked/controller/concerns/path.rb', line 28 def wizard_path(goto_step = nil, = {}) = .respond_to?(:to_h) ? .to_h : = { :controller => wicked_controller, :action => 'show', :id => goto_step || params[:id], :only_path => true }.merge url_for() end |
#wizard_url(goto_step = nil, options = {}) ⇒ Object
38 39 40 |
# File 'lib/wicked/controller/concerns/path.rb', line 38 def wizard_url(goto_step = nil, = {}) wizard_path(goto_step, .merge(only_path: false)) end |