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.

Kane's latest activity

Saturday, August 14 2010
5216 find_by_id isn't working was updated in Ruby on Rails
  • Kane
    Kane commented at 11:20 PM

    changing find_by_id to a some kind of find_by_primary_key seems awfull to me. I really dont like this change.
    the find_by_something is clearly for db attributes...

5377 ActiveRecord has_and_belongs_to_many doesn't include self.table_name_prefix was updated in Ruby on Rails
  • Kane
    Kane commented at 7:36 PM

    Currently habtm doesn't take into account the namespaces for computing the join table like the other associations.

    Samuel, i told you before, namespaces doent...

Friday, August 13 2010
5345 ActiveRecord ignoring set_table_name on save was updated in Ruby on Rails
  • Kane
    Kane commented at 5:23 PM

    Im not quite sure that this worked in any previous versions.
    normally AR assumes STI if you inherit from another model.
    if you dont want that you could declare ...

Wednesday, August 11 2010
4386 dependent => :destroy deletes children before "before_destroy" is executed was updated in Ruby on Rails
  • Kane
    Kane commented at 10:32 PM

    yea i know as i said the problem can be avoided by altering the order.
    but the issue here is that this is not so obvious for the user and whether the actual beh...

  • Kane
    Kane commented at 5:06 PM

    i encountered this too in 3.0.0.rc
    to workaround this issue i didnt use the dependent option and instead created an before_destroy callback which destroys all a...

5345 ActiveRecord ignoring set_table_name on save was updated in Ruby on Rails
  • Kane
    Kane commented at 5:00 PM

    i cant confirm this.

    could you provide more details? maybe the code of your model?

Monday, August 02 2010
2802 fixed counter_sql from finder_sql to work with subselects was updated in Ruby on Rails
  • Kane
    Kane commented at 6:24 PM

    SELECT * FROM articles WHERE id IN (SELECT article_id FROM comments WHERE text LIKE '%test%');

Sunday, August 01 2010
5054 problem joining two models that establish_connection to the same db was updated in Ruby on Rails
  • Kane
    Kane commented at 2:26 PM

    If you want a tempory fix till this issue is addressed in the rails core you could make a superclass for this models in which you connect to the database.

    clas...
5253 Rails 3.0 RC cannot capture exception when database goes down! was updated in Ruby on Rails
  • Kane
    Kane commented at 2:21 PM

    i found similar issues as i wrote some workers with the nanite gem and activerecord
    and found myself hacking PostgreSQLAdapter AbstractAdapter and ConnectionPoo...

Sunday, June 27 2010
4975 Model Namespaces and HABTM was updated in Ruby on Rails
  • Kane
    Kane commented at 1:46 AM

    you dont namespace, what you described are nested classes. If you would use namespacing the namespace wouldnt go into the table name and everything would be oke...