Skip to content

Commit

Permalink
Preserve the options hash when not a params object
Browse files Browse the repository at this point in the history
Before this change, if the second argument was not a params object,
`options` would be set to false. As a Hash responds to `#to_h` just send
it before the merge no matter what.

Fixes #205
  • Loading branch information
prognostikos committed May 11, 2016
1 parent 68ba6a3 commit fc222ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wicked/controller/concerns/path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def wicked_action


def wizard_path(goto_step = nil, options = {})
options = options.to_h if options.respond_to?(:permitted?) && options.respond_to?(:to_h)
options = options.respond_to?(:to_h) ? options.to_h : options
options = { :controller => wicked_controller,
:action => 'show',
:id => goto_step || params[:id],
Expand Down

0 comments on commit fc222ba

Please sign in to comment.