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.

2kan's latest activity

Thursday, February 03 2011
2594 Bug with polymorphic has_one :as pointing to STI record was updated in Ruby on Rails
  • 2kan
    2kan commented at 12:43 PM

    Xac, Rohit Arondekar As i see it is not broken in Rails 3 because to the sponsors table will be added a sponsor with sponsorable_type set to Organization (to th...

1717 ActiveResource::CustomMethods#put should behave like #post for body encoding was updated in Ruby on Rails
  • 2kan
    2kan commented at 10:52 AM

    It is simple. This methods are designed (as I understand) to invoke REST methods. For example you can use post method to create a new object. And you can not to...

Wednesday, February 02 2011
6290 [PATCH] except doesn't work in different scopes was updated in Ruby on Rails
  • 2kan
    2kan commented at 11:58 PM

    Oh, sorry, it is 2:57 AM here. In my previous comment we can't do first and can second and so can't do the last example with a Post class.

  • 2kan
    2kan commented at 11:56 PM

    Adam Wróbel, i mean that it is not intuitive why we can do:

    order(:division_name).order(:name)
    

    and can't:

    Employee.order(:division_name,:name)
    

    or do somethi...

  • 2kan
    2kan commented at 11:50 PM

    Adam Wróbel, order is a multi value and I can give you a lot of examples from my real apps where you need to use queries like:

    SELECT * from employers WHERE OR...
1812 default_scope can't take procs was updated in Ruby on Rails
  • 2kan
    2kan commented at 2:40 PM

    I think that Adam Wróbel is correct in his general idea: AR::Relation should be refactored because there are some problems with current code. I think we should ...

Tuesday, January 25 2011
6297 [PATCH] Default scopes can't be merged with something that responds_to call was updated in Ruby on Rails
  • 2kan
    2kan commented at 2:02 PM

    @Adam, Looks like are familiar with those ticket and patches. What are the current status? Are they working for edge rails? I mean that as I see you can define ...

Monday, January 17 2011
6297 [PATCH] Default scopes can't be merged with something that responds_to call was updated in Ruby on Rails
  • 2kan
    • Tag changed from rails edge, active_record, default_scope to rails edge, active_record, bug, default_scope, patch
    by 2kan at 1:21 AM

    Here is my patch (with test) that raises exception in such situations.

  • 2kan
    2kan created the ticket at 1:13 AM

    When we have something like this:

    class A < ActiveRecord::Base
     default_scope where('salary >= 10000')
     default_scope lambda { order('salary DESC') }
    end
    

    or

    ...
Saturday, January 15 2011
6290 [PATCH] except doesn't work in different scopes was updated in Ruby on Rails
  • 2kan
    • Assigned user changed from Santiago Pastorino to Aaron Patterson
    • Tag changed from activerecord scopes, rails edge, scope to activerecord scopes, rails edge, bug, patch, scope
    by 2kan at 12:55 AM