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.

duncanbeevers's latest activity

Thursday, September 17 2009
2810 with_scope should accept and use order option was updated in Ruby on Rails
  • duncanbeevers
    duncanbeevers commented at 11:48 PM

    +1

    I think this fits best with people's expectations of how scopes should compose.

Wednesday, November 05 2008
1334 Count calculations should respect scoped selects was created in Ruby on Rails
  • duncanbeevers
    duncanbeevers created the ticket at 10:02 PM

    Issuing a count calculation on a scope that explicitly specifies a select option does not respect that select, resulting in incorrect counts.

Saturday, August 09 2008
786 Date columns cast assigned values to Date was created in Ruby on Rails
  • duncanbeevers
    duncanbeevers created the ticket at 12:00 AM

    Creating a record whose underlying database store is a date-type column does not cast the value on the newly-created record to a Date.

    Reading the record back ...

Monday, June 23 2008
46 with_scope clobbers result attributes when :joins key is specified was updated in Ruby on Rails
  • duncanbeevers
    duncanbeevers commented at 7:06 PM

    Argh! I've helped make construct_finder_sql that little bit uglier!

Tuesday, May 06 2008
97 Enhancement: Add scope_options inspection method to named_scope was updated in Ruby on Rails
  • duncanbeevers
    duncanbeevers commented at 9:32 PM

    I think giving the method a different name is appropriate, and at a minimum the tests should be carried over.

Saturday, May 03 2008
90 Enhancement: Add support for named scopes with optional arguments was updated in Ruby on Rails
  • duncanbeevers
    duncanbeevers commented at 2:06 AM

    No offense taken.

    I quite like the idea of having the scope itself emit its options, and I've realy come around on using class methods as scopes. Could be us...

  • duncanbeevers
    duncanbeevers commented at 12:52 AM

    Perhaps

    :scope_method
    
  • duncanbeevers
    duncanbeevers commented at 12:49 AM

    The provided patch allows for providing a method name as the scope using a symbol as the method name.

    def Topic < ActiveRecord::Base
      named_scope :written_b...
97 Enhancement: Add scope_options inspection method to named_scope was created in Ruby on Rails
  • duncanbeevers
    duncanbeevers created the ticket at 1:53 AM

    When generating complex options hashes for named scopes, it can be difficult to test that the scopes are generated correctly. By providing insight into the ge...

Friday, May 02 2008
57 :through option for "named_scope" was updated in Ruby on Rails
  • duncanbeevers
    duncanbeevers commented at 11:02 PM

    I've been thinking about similar functionality, and thus far I've found it most flexible to simply specify composite scopes as proper methods.

    def self.writte...