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.

Andrew White's latest activity

Monday, March 21 2011
6600 3.0.5 AR: has_many :through - wrong table name was updated in Ruby on Rails
  • Andrew White
    • State changed from new to duplicate
    by Andrew White at 11:56 AM
  • Andrew White
    • Importance changed from to Low
    by Andrew White at 11:56 AM

    Duplicate of #6479.

    Strictly speaking criteria is the plural of criterion - your class name should be RecordCriterion. However this still doesn't work so you'll...

Saturday, March 19 2011
4444 Can no longer rescue_from ActionController::RoutingError was updated in Ruby on Rails
  • Andrew White
    Andrew White commented at 6:48 AM

    Are you using :action as the dynamic segment name? If so Rails will try to find the action in the controller. The following path works for me:

    match '*path', :...
6275 AbstractController::ActionNotFound should be rescued was updated in Ruby on Rails
  • Andrew White
    Andrew White commented at 6:36 AM

    Shouldn't it be in the global namespace? i.e. HomeController and not MyApp::HomeController.

6594 Not routing to correct non-default controller was updated in Ruby on Rails
  • Andrew White
    • State changed from new to needs-more-info
    • Importance changed from to Low
    by Andrew White at 5:38 AM

    Need a bit more of your routes.rb file to see what's happening - to get the '/articles/:id' part of the path the resources call needs to be wrapped with somethi...

Sunday, March 13 2011
6259 validate_presence_of does not work with :allow_nil => true was updated in Ruby on Rails
  • Andrew White
    Andrew White commented at 10:12 AM

    It's actually a non-change :)

    I'm not sure what you're to achieve - the validates_associated will ensure :assistant_teacher is valid if it's present. If you're ...

Saturday, March 12 2011
6460 active_support/core_ext/string/inflections doesn't load default inflections was updated in Ruby on Rails
  • Andrew White
    Andrew White commented at 9:33 PM

    Agreed - 'active_support/inflector' is the correct require.

6564 undefined method `zero?' for #<OrderedHash {}> was updated in Ruby on Rails
Friday, March 11 2011
6563 Model with namespace doesn't work well was updated in Ruby on Rails
  • Andrew White
    • State changed from new to duplicate
    • Importance changed from to Low
    by Andrew White at 8:04 PM

    This is a duplicate of #5383 - if you rewrite your class definitions so that they're not inline everything will work, e.g:

    module Admin
      class UsersController...
6564 undefined method `zero?' for #<OrderedHash {}> was updated in Ruby on Rails
  • Andrew White
    • State changed from new to open
    • Milestone set to 3.0.6
    • Assigned user set to Andrew White
    • Importance changed from to Low
    by Andrew White at 7:49 PM

    A good place to start would be the empty? method declaration in ActiveRecord::Relation - it does a count.zero? which because you're grouping returns an ordered ...