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.

Stevo's latest activity

Monday, July 26 2010
5183 ModelName.limit(n).size returns invalid number was updated in Ruby on Rails
  • Stevo
    Stevo commented at 8:12 AM

    Just tested it against some other model to make sure that it is not model specific somehow...

    >>User.count
     => 2 
    >>User.limit(1).count
     => 2 
    >>User.limit(1)....
  • Stevo
    Stevo commented at 8:05 AM

    rails -v
    Rails 3.0.0.beta4
    ruby -v
    ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.01

Saturday, July 24 2010
5183 ModelName.limit(n).size returns invalid number was updated in Ruby on Rails
  • Stevo
    Stevo commented at 4:13 PM

    I just did want to make myself sure, that there was at least n records returned (in example that I gave it doesn't make sense, however there were more scopes in...

  • Stevo
    Stevo commented at 2:40 PM

    Still, isn't it counter-intuitive that size() executed on scope counts all records disregarding limit() condition?

Friday, July 23 2010
5183 ModelName.limit(n).size returns invalid number was created in Ruby on Rails
  • Stevo
    Stevo created the ticket at 9:49 AM

    ModelName.limit(n).size returns invalid number

    Question.limit(3).size
    => 200

    Question.limit(3).length
    => 3