arguments passed to url_for can't be handled (Rails 4)

1,515 views
Skip to first unread message

AQ

unread,
Nov 7, 2013, 4:06:18 AM11/7/13
to cells-an...@googlegroups.com
https://github.com/apotonick/apotomo/issues/131

"arguments passed to url_for can't be handled. Please require routes or provide your own implementation"
is thrown on every call to url_for_event or to any path helper from within a widget. (I have "include ActionView::Helpers::UrlHelper", but same without).

I understand a pending change to UrlHelper in the Rails core will address this.
Might anyone know of a workaround in the meantime so I can upgrade to Rails 4?

Nick Sutterer

unread,
Nov 7, 2013, 6:26:32 PM11/7/13
to cells-an...@googlegroups.com
It's a bit funny since the tests pass with Rails 4 - what versions you running, Alan?


--
Sie erhalten diese Nachricht, weil Sie Mitglied der Google Groups-Gruppe "Cells and Apotomo" sind.
Um Ihr Abonnement für diese Gruppe zu beenden und keine E-Mails mehr von dieser Gruppe zu erhalten, senden Sie eine Email an cells-and-apot...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out

AlanQ

unread,
Nov 11, 2013, 11:47:15 AM11/11/13
to cells-an...@googlegroups.com
Trying Rails 4.0.1 now and same outcome 

arguments passed to url_for can't be handled. Please require routes or provide your own implementation
actionpack (4.0.1) lib/action_view/helpers/url_helper.rb:38:in `url_for'
actionpack (4.0.1) lib/action_dispatch/routing/route_set.rb:234:in `call'
actionpack (4.0.1) lib/action_dispatch/routing/route_set.rb:178:in `call'
actionpack (4.0.1) lib/action_dispatch/routing/route_set.rb:274:in `block (2 levels) in define_url_helper'


--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "Cells and Apotomo" abonniert haben.
Um Ihr Abonnement für dieses Thema zu beenden, rufen Sie die URL https://groups.google.com/d/topic/cells-and-apotomo/ztpoQG3HkMI/unsubscribe auf.
Um Ihr Abonnement für diese Gruppe und alle ihre Themen zu beenden, senden Sie eine E-Mail an cells-and-apot...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out

AQ

unread,
Nov 13, 2013, 3:42:43 AM11/13/13
to cells-an...@googlegroups.com
I'm guessing it might be because the widget is within a mounted engine?

Nick Sutterer

unread,
Nov 13, 2013, 6:12:51 PM11/13/13
to cells-an...@googlegroups.com
Ah, that might be another problem. Good to know! Nevertheless, the actual issue is the braindead assumption in UrlHelper that this module is included before the module implementing #url_for. I know of a work-around but it sucks and I can't think of any quit solution for that.


2013/11/13 AQ <ala...@gmail.com>
I'm guessing it might be because the widget is within a mounted engine?

--

AlanQ

unread,
Nov 14, 2013, 10:39:26 AM11/14/13
to cells-an...@googlegroups.com
I'd take a sucky work-around for the moment to allow me upgrade to Rails 4.
Any tips how I might go about it?

I tried including ActionView::RoutingUrlFor in the widget but its super invokes the same UrlHelper.

Looks like there's a similar issue here:


2013/11/13 Nick Sutterer <apot...@gmail.com>

--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "Cells and Apotomo" abonniert haben.
Um Ihr Abonnement für dieses Thema zu beenden, rufen Sie die URL https://groups.google.com/d/topic/cells-and-apotomo/ztpoQG3HkMI/unsubscribe auf.
Um Ihr Abonnement für diese Gruppe und alle ihre Themen zu beenden, senden Sie eine E-Mail an cells-and-apot...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out

Reply all
Reply to author
Forward
0 new messages