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.

James's latest activity

Saturday, February 05 2011
6374 Limit is ignored when joins is specified was updated in Ruby on Rails
  • James
    James commented at 3:55 PM

    Yeah -- that makes perfect sense -- forgot that count and size actually modify the query and return a single row.

    So what about my specific case with update_all...

Friday, February 04 2011
6374 Limit is ignored when joins is specified was updated in Ruby on Rails
  • James
    James commented at 5:22 PM

    Turns out it has nothing to do with the joins.

    Animal.limit(1).count
    => 1297

    Is that expected behavior?

    Found this by trying to do (essentially) Animal.limit(1)...

  • James
    James created the ticket at 4:45 PM

    Limit is being ignored in the following case. When calling to_sql on the ARel object, it returns the correct SQL. Then, calling that query with find_by_sql retu...

Friday, September 24 2010
5698 select() ignored in subquery when querying with count() was created in Ruby on Rails
  • James
    James created the ticket at 4:31 PM
    Login.where(:date => Date.today).select("DISTINCT player_id").all
    

    As expected, this produces the following query:

    SELECT DISTINCT player_id FROM `logins` WHE...
Wednesday, July 28 2010
5222 Route Globbing and Root URL was created in Ruby on Rails
  • James
    James created the ticket at 12:53 AM

    The following route should pick up any route for the application and provide params[:path].

    My::Application.routes.draw do |map|
      match '*path' => 'public#go'...
Monday, February 08 2010
3853 Route to root of a namespace was updated in Ruby on Rails
  • James
    James commented at 11:21 PM

    Is there any reason we should need to explicitly set the namespace in the :to when we're within the namespace block? Seems like it should know about the namespa...

Friday, February 05 2010
3853 Route to root of a namespace was updated in Ruby on Rails
  • James
    James commented at 4:58 PM

    Josh,

    Previously it provided the "admin_root_url" named route, which seems to me like a great convention as it kept everything (including the index) within the ...

Thursday, February 04 2010
3854 Missing require: rubygems was updated in Ruby on Rails
  • James
    James commented at 10:27 PM

    Use ruby railties/bin/rails --dev to build an app from the edge source.

3853 Route to root of a namespace was created in Ruby on Rails
  • James
    James created the ticket at 6:41 PM

    In Rails 2.3.x, you could do the following:

    map.namespace :admin do |admin|
      admin.root :controller => "admin"
    end
    

    It appears this functionality is missing i...

Friday, March 13 2009
2232 default_scope inconsistent behavior was created in Ruby on Rails
  • James
    James created the ticket at 11:36 PM

    I'm getting inconsistent results when using default_scope. What are its limitations? Right now I'm only trying to use it for default ordering, but it doesn't se...