Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Nader Akhnoukh's latest activity

Friday, October 29 2010
5874 url_for <model> generates a <model>_url route instead of <model>_path was updated in Ruby on Rails
  • Nader Akhnoukh
    Nader Akhnoukh commented at 5:33 PM

    yep, i think that might be the best solution. seems like messing with url_for just leads to trouble. thanks for all your help. just out of curiosity, do you kno...

  • Nader Akhnoukh
    Nader Akhnoukh commented at 4:26 PM

    Let say that for example I'm at my root app domain mydomain.com. And each of my users has their own subdomain. So in the view they each have links like root_url...

  • Nader Akhnoukh
    Nader Akhnoukh commented at 3:47 PM

    Hi Andrew, sorry I wasn't clear.

    I want to set the host based on some application logic. So this was my old method:

    def url_for(options = nil)
      if options.kin...
  • Nader Akhnoukh
    Nader Akhnoukh commented at 9:30 AM

    Andrew, the only thing I can't figure out is if I'm setting this in a before_filter I don't have access to the options hash. I am passing in a subdomain field w...

  • Nader Akhnoukh
    Nader Akhnoukh commented at 7:27 AM

    Wow, that was some impressive sleuthing. That's exactly what I was doing. Thanks for the huge help.

Thursday, October 28 2010
5874 url_for <model> generates a <model>_url route instead of <model>_path was updated in Ruby on Rails
  • Nader Akhnoukh
    Nader Akhnoukh commented at 8:36 PM

    Also, the reason this is a big issue for me is because my clients use CNAMEs to get to their site. I have a piece of rack middleware that looks up the CNAME and...

  • Nader Akhnoukh
    Nader Akhnoukh commented at 5:39 PM

    OK, I think I see what's happening. Here's the backtrace from where the routing type is set to url:

    --> #0 ActionDispatch::Routing::PolymorphicRoutes.routing_t...
  • Nader Akhnoukh
    Nader Akhnoukh commented at 4:30 PM

    I'm using link_to @user from a view.

    The code path goes like this:
    -routing/url_for.rb:url_for (options is just the user record) # i think this is the bug, shou...

  • Nader Akhnoukh
    Nader Akhnoukh created the ticket at 12:19 AM

    Rails 3.0.0

    for example link_to @user will generate the equivalent of user_url. shouldn't the default behavior be user_path?

    This is because url_for line 134 is...