ruby on rails - Why are my HAML named routes empty? -


i'm trying create pages in haml, partly working. html produces correct, apart 1 thing. have:

%ul#menu    %li      = link_to 'home', root_url 

i expecting back:

<a href="/">home</a> 

instead, producing:

<a href>home</a> 

upon looking further, seems of named routes returning blank string , not route meant to. happening on of them not root.

if try changing made-up name, 'test_path' then, expect, error saying method doesn't exist, it's not case of not being able find it, it's not returning anything.

in rails console able correct route know it's working, , rake routes gives me:

about        /about(.:format)                   welcome#about contact      /contact(.:format)                 welcome#contact faq          /faq(.:format)                     welcome#faq plans        /plans(.:format)                   welcome#plans root         /                                  welcome#index 

can pretty major issue , makes pretty hard keep developing if can't generate links anything

ok, figured out was.

the application i'm working on uses basecamp-style subdomains organisation.

following railscast #221 subdomains in rails 3 on implementing subdomains, had created url_for method shown, missed super keyword never generating url.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -