Open morganchristiansson opened 15 years ago
Commited fix in http://github.com/morganchristiansson/wizardly/commit/c614305e8a92d263e7a827f9fef8a0518eea226f
Let me know if you think this is correct.
Regards, Morgan
Thanks Morgan. Looked into the problem. I believe your solution suffices except for the situation where a request comes from a resource without an available GET method. But I think this is rectified by wrapping as such
begin h = ::ActionController::Routing::Routes.recognize_path(URI.parse(r).path, {:method=>:get}) rescue else return check_progression if (h[:controller]||'') == '#{self.controller_path}' self.initial_referer = h unless self.initial_referer end
I've tested and regemed. If this works for you, I'll close this issue.
Regards, Jeff
sorry, code was not very readable... try this
begin
h = ::ActionController::Routing::Routes.recognize_path(URI.parse(r).path, {:method=>:get})
rescue
else
return check_progression if (h[:controller]||'') == '#{self.controller_path}' self.initial_referer = h unless self.initial_referer
end
My app fails in the guard_entry method where ::ActionController::Routing::Routes.recognize_path(path) statement is run, regardless of :guard option to act_as_wizard.
Here is a reproducible snippet:
However if i pass in :method => :get option it works fine.
This happens for routes that have :conditions => { :method => :get } defined and includes all routes defined by map.resources. If the request comes from one of these URLs this error will happen.