Sha256: 2961e47cc4c62c804275f861fb9f5a021221642a45318c001f952a81681b7114

Contents?: true

Size: 863 Bytes

Versions: 260

Compression:

Stored size: 863 Bytes

Contents

module Effective
  module WizardController
    module WickedOverrides

      # Changes made here to work inside an effective rails engine
      #
      # https://github.com/zombocom/wicked/blob/main/lib/wicked/controller/concerns/path.rb
      # https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/url_for.rb#L180
      def wizard_path(goto_step = nil, options = {})
        options = options.respond_to?(:to_h) ? options.to_h : options
        options = { :controller => wicked_controller,
                    :action     => 'show',
                    :id         => goto_step || params[:id],
                    :only_path  => true
                   }.merge(options)

        merged_url_options = options.reverse_merge!(url_options)
        effective_resource.url_helpers.url_for(merged_url_options)
      end

    end
  end
end

Version data entries

260 entries across 260 versions & 1 rubygems

Version Path
effective_resources-2.27.9 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.8 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.7 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.6 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.5 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.4 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.3 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.2 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.1 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.27.0 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.26.5 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.26.4 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.26.3 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.26.2 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.26.1 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.26.0 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.25.16 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.25.15 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.25.14 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
effective_resources-2.25.13 app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb