You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use wicked in my mounted engine but I always got errors like:
No route matches {:action=>"show", :controller=>"my_engine/contacts/contact_wizard", :id=>:type}
This happened here: /home.rvm/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/wicked-1.1.1/lib/wicked/controller/concerns/path.rb:28:in 'wizard_path'
So I fixed this by overriding the wizard_path method in my wizard controller. I replaced the url_for call with my engines routes method like this:
defwizard_path(goto_step=nil,options={})options={:controller=>wicked_controller,:action=>'show',:id=>goto_step || params[:id],:only_path=>true}.mergeoptions# This line fixed it since the plain url_for does not know anything about the engine routes.MyEngine::Core::Engine.routes.url_for(options)end
Now my question: Is there any best practice/better way to do this?
The text was updated successfully, but these errors were encountered:
I've never seen wicked used this way. Can you give me a barebones rails app with attached engine in a new github project so I can look into this further?
I maintain this for free in my free time. However long it takes you to make an example app that reproduces your problem, it will take me 10x longer if I even can reproduce it. If I could write an app that breaks wicked, then I would have already fixed wicked. It's the most impactful thing you can do to help get this issue fixed.
I'm willing and happy to take a look, but you have to help me help you.
Hi together,
I tried to use wicked in my mounted engine but I always got errors like:
No route matches {:action=>"show", :controller=>"my_engine/contacts/contact_wizard", :id=>:type}
This happened here:
/home.rvm/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/wicked-1.1.1/lib/wicked/controller/concerns/path.rb:28:in 'wizard_path'
So I fixed this by overriding the wizard_path method in my wizard controller. I replaced the
url_for
call with my engines routes method like this:Now my question: Is there any best practice/better way to do this?
The text was updated successfully, but these errors were encountered: