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.

Steven Soroka's latest activity

Friday, May 20 2011
6751 Rails assumes too much about the name of the "production" environment was updated in Ruby on Rails
  • Steven Soroka
    • Tag changed from environments, production to environments, invalid, production
    by Steven Soroka at 3:50 AM

    For such a special case, just override what production means like Pavel suggested.

    -1

6789 Arel sum not honoring limit was updated in Ruby on Rails
  • Steven Soroka
    • Tag changed from arel rails3 sum limit sql to arel rails3 sum limit sql, invalid
    by Steven Soroka at 3:44 AM

    Since Arel's job is essentially to generate the sql you need, and the sql you are trying to generate is not valid, it doesn't make sense to expect arel to magic...

Sunday, March 21 2010
1282 has_many :dependent => :restrict was updated in Ruby on Rails
  • Steven Soroka
    Steven Soroka commented at 3:30 PM

    I have some time, I'll take another look at this. I think you'd be fine to use the patch as long as you have transaction support in the database.

Tuesday, July 21 2009
2364 ignore_nil{} as a better alternative to try() was updated in Ruby on Rails
  • Steven Soroka
    Steven Soroka commented at 3:10 PM

    I don't think .try().try().try().try() is attractive, and it's definitely not DRY.

    Much easier to edit and maintain a block around the code than .try sprinkled ...

Friday, May 01 2009
1721 Unify approach to gem dependencies was updated in Ruby on Rails
  • Steven Soroka
    Steven Soroka commented at 10:40 PM

    david dollar and I have been working on the (merb inspired?) dependencies gem. I'm using it in a large project and it's been working really well for me. http://...

Thursday, April 09 2009
2371 Default scope with :conditions => "a string" was updated in Ruby on Rails
  • Steven Soroka
    Steven Soroka commented at 6:14 PM

    I had:

    
      default_scope :conditions => ['available != ?', 1]
    

    and this fixed the problem; however, I don't think default_scope should be assuming it can use ...

Monday, April 06 2009
2189 count breaks has_many through association collection with named scope was updated in Ruby on Rails
  • Steven Soroka
    Steven Soroka commented at 3:55 PM

    @Guillermo: that's a horrible "solution", and a waste of resources (fetches all records and instantiates all rows as AR objects, just to check if there's any). ...

Thursday, April 02 2009
2189 count breaks has_many through association collection with named scope was updated in Ruby on Rails
  • Steven Soroka
    Steven Soroka commented at 3:49 PM

    Okay, I applied this patch in my app, (Rails 2.3.2) as such:

    
    module CountFix
      def self.included(base)
        base.class_eval do
          extend ClassMethods
     ...
Tuesday, March 31 2009
2378 AssociationProxy#method_missing masks method_missing in models was updated in Ruby on Rails
  • Steven Soroka
    • State changed from new to invalid
    by Steven Soroka at 9:47 PM

    gah. I found a problem with this. If the method is there and it calls something else that raises a NoMethodError, the method_missing here makes it seem as if it...

Monday, March 30 2009
2378 AssociationProxy#method_missing masks method_missing in models was updated in Ruby on Rails
  • Steven Soroka
    • Tag set to 3.0, active_record, association_proxy, method_missing, nomethoderror
    by Steven Soroka at 10:44 PM