Closed dfischer closed 12 years ago
I found the issue causing it.
It appears that anytime you have a link_to it must have a supplemented route (even if empty) otherwise it causes a routing issue.
E.g, I had several links that were placeholders like this
= link_to 'Home'
= link_to 'Betterfrontend'
= link_to 'About'
This code in application.html.haml caused it to fail until I switched it over to:
= link_to 'Home', ''
= link_to 'Betterfrontend', ''
= link_to 'About', ''
This is not the first time I see this "issue" but tbh I'm not sure how can we fix this...
I don't know why you would put a link_to without a url
Sometimes you stub something out for a design. Either way it shouldn't break like that.
On Mon, Oct 15, 2012 at 12:59 PM, Philip Arndt notifications@github.comwrote:
I don't know why you would put a link_to without a url
— Reply to this email directly or view it on GitHubhttps://github.com/refinery/refinerycms/issues/1984#issuecomment-9459268.
Does this happen only with Refinery or also with other things like Spree or a simple Rails mountable engine?
When you don't pass any arguments, Rails will call url_for
with no options, which triggers polymorphic_path
with no options, which calls polymorphic_url({}, {:routing_type => :path})
, which calls...
I stopped at about 20 levels deep. From what I see, Rails is just simply not designed to handle link_to
without a second argument. I know it's a splat, but you should simply consider appending '' or '#' as the argument, @dfischer.
I was trying to follow the guide on how to create a RefineryCMS install and a demo extension and I got the following error upon visiting http://localhost:3000/events
Thoughts? Am I doing something wrong or is there a bug in Refinery?