{"action":"created","issue":{"url":"https://api.github.com/repos/schneems/wicked/issues/179","labels_url":"https://api.github.com/repos/schneems/wicked/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/schneems/wicked/issues/179/comments","events_url":"https://api.github.com/repos/schneems/wicked/issues/179/events","html_url":"https://github.com/schneems/wicked/issues/179","id":96672778,"number":179,"title":"wizard_path's \"url_for\" call throws ActionController::UrlGenerationError in mounted engine","user":{"login":"fsauter","id":536192,"avatar_url":"https://avatars.githubusercontent.com/u/536192?v=3","gravatar_id":"","url":"https://api.github.com/users/fsauter","html_url":"https://github.com/fsauter","followers_url":"https://api.github.com/users/fsauter/followers","following_url":"https://api.github.com/users/fsauter/following{/other_user}","gists_url":"https://api.github.com/users/fsauter/gists{/gist_id}","starred_url":"https://api.github.com/users/fsauter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsauter/subscriptions","organizations_url":"https://api.github.com/users/fsauter/orgs","repos_url":"https://api.github.com/users/fsauter/repos","events_url":"https://api.github.com/users/fsauter/events{/privacy}","received_events_url":"https://api.github.com/users/fsauter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-22T21:46:59Z","updated_at":"2015-07-23T19:46:14Z","closed_at":null,"body":"Hi together,\r\n\r\nI tried to use wicked in my mounted engine but I always got errors like:\r\n\r\n`No route matches {:action=>\"show\", :controller=>\"my_engine/contacts/contact_wizard\", :id=>:type}`\r\n\r\nThis happened here:\r\n`/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'`\r\n\r\nSo 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:\r\n\r\n````ruby\r\ndef wizard_path(goto_step = nil, options = {})\r\n  options = { :controller => wicked_controller,\r\n              :action     => 'show',\r\n              :id         => goto_step || params[:id],\r\n              :only_path  => true\r\n  }.merge options\r\n  # This line fixed it since the plain url_for does not know anything about the engine routes.\r\n  MyEngine::Core::Engine.routes.url_for(options)\r\nend\r\n````\r\n\r\nNow my question: Is there any best practice/better way to do this?"},"comment":{"url":"https://api.github.com/repos/schneems/wicked/issues/comments/124221676","html_url":"https://github.com/schneems/wicked/issues/179#issuecomment-124221676","issue_url":"https://api.github.com/repos/schneems/wicked/issues/179","id":124221676,"user":{"login":"schneems","id":59744,"avatar_url":"https://avatars.githubusercontent.com/u/59744?v=3","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T19:46:14Z","updated_at":"2015-07-23T19:46:14Z","body":"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?"}}