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.

Josh Susser's latest activity

Friday, March 25 2011
6613 add first_bang to AR was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 4:46 PM

    Ugh, typo in comments. How lame is that? Here's the fix.

Thursday, March 24 2011
6613 add first_bang to AR was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 4:45 PM

    By the way, the simplistic example given in the original ticket above isn't the motivating use case. That would be using an association or scope to find a recor...

  • Josh Susser
    Josh Susser commented at 4:33 PM

    OK, added last! too. (Aaron, you were right!)

  • Josh Susser
    Josh Susser created the ticket at 5:03 AM

    Before scopes, controller methods did this:

    @user = User.find(params[:id])
    

    Now with scopes you can do

    @user = User.where(:id => params[:id]).first
    

    However t...

Friday, March 26 2010
4264 find railties by name was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 3:41 PM

    Jeremy, what's the downside? Names are still optional when creating railties/engines - if you don't specify one the railtie gets assigned the default name based...

  • Josh Susser
    Josh Susser commented at 4:31 AM

    I need this for my patch to run migrations within engines, to allow identifying an engine by name. Seemed to make sense to make it a separate patch.

Thursday, March 25 2010
4264 find railties by name was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 6:35 AM
  • Josh Susser
    • Tag changed from railties to patch, railties
    by Josh Susser at 6:23 AM
  • Josh Susser
    Josh Susser created the ticket at 6:18 AM

    Very simple 1-liner method to find railties and engines by name.

    module Rotary
      class Wankle < Rails::Engine
        engine_name :wankle
      end
    end
    Rails::Engine.n...
Tuesday, March 09 2010
4120 rake db:migrate skips migrations with older version numbers than current was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 7:07 AM

    And now it seems like this isn't happening after all. I heard multiple reports of this and thought I reproduced it, but now I can't. Unless someone else has a r...