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.

MatthewRudy's latest activity

Thursday, July 17 2008
642 [BUG] Routes matching a :controller /regexp/ raise NameError was created in Ruby on Rails
  • MatthewRudy
    MatthewRudy created the ticket at 1:39 PM
    #admin controller routes
    map.connect ':controller/:action/:id', :requirements => { :controller => /admin[\/]?[\w\d]*/ }
    

    GET /admin/doesnt_exist

    will raise a...

613 Slice and Slice! don't accept an array of keys was updated in Ruby on Rails
  • MatthewRudy
    MatthewRudy commented at 1:26 PM
    def test_slice_with_splatted_keys
      original = { :a => 'x', :b => 'y', :c => 10, [:a, :b] => "an array key" }
      expected = { :a => 'x', :b => "y" }
    
      # Sho...
  • MatthewRudy
    MatthewRudy commented at 1:23 PM

    and here's a perversion of the attached test.

    def test_slice_with_array_keys
      original = { :a => 'x', :b => 'y', :c => 10, [:a, :b] => "an array key" }
      e...
  • MatthewRudy
    MatthewRudy commented at 1:19 PM

    reiterating,

    this is bad.

    if you want to pass it an array,

    you should be able to pass it an array,

    if you want to splat it,

    splat it

    hash.slice(*[:a,:b])...

Sunday, June 29 2008
508 How to use comet with RoR? was updated in Ruby on Rails
  • MatthewRudy
    MatthewRudy commented at 11:19 AM

    I think you got the wrong site, mate.

    This is a site for reporting bugs, or requesting changes to rails itself.

    (at the moment any Comet implementation is pu...

467 Hash Conditions belongs_to sugar was updated in Ruby on Rails
  • MatthewRudy
    MatthewRudy commented at 1:38 AM

    don't know if I agree with that.

    if I wanted to be rigidly tied to the db structure I'd write everything as SQL strings

    the hash :conditions already brings a...

505 Eager loading doesn't respect :limit option of the loaded association was updated in Ruby on Rails
  • MatthewRudy
    MatthewRudy commented at 1:21 AM

    and then one could argue the following;

    class A
      has_many :bs, :limit => 2
    end
    
    >> a.bs
    => [#< B:1 >, #<B:2 >]
    >> a.bs.create()
    (irb):10:in `irb_bindi...
Monday, June 23 2008
467 Hash Conditions belongs_to sugar was updated in Ruby on Rails
  • MatthewRudy
    MatthewRudy commented at 12:22 AM

    yeah,

    diff looks clean... nice.

    like Lawrence's change also.

    surely these should be merged together?

    class Model
      belongs_to :association
    end
    
    Model.f...
Sunday, June 22 2008
469 validates_acceptance_of deep failure ? was updated in Ruby on Rails
  • MatthewRudy
    MatthewRudy commented at 9:44 PM

    well, that was my suggestion,

    and what my code did was...

    default to "1" or true

    But, need to get a core team guy on here to decide what "should" be the def...

  • MatthewRudy
    MatthewRudy commented at 7:29 PM

    great,

    so the current functionality is fine, I guess.