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.

Aliaksey Kandratsenka's latest activity

Saturday, February 05 2011
1855 Return associated records not proxies from readers of non-collection associat... was updated in Ruby on Rails
  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 5:23 PM

    From quick glimpse of rails 3 code base it seems to be still relevant. I.e. returning proxy from belong_to accessor stills makes little sense.
    Obviously, patch ...

Tuesday, February 03 2009
1855 [PATCH] return associated records not proxies from readers of non-collection ... was created in Ruby on Rails
  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka created the ticket at 6:49 AM

    When using association value in if/unless operators it's not possible to emulate nil value. So we used to load the associated record on first access and return ...

Thursday, January 29 2009
1815 [PATCH] Add or_if_blank to Object was updated in Ruby on Rails
  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 6:43 AM

    I'm not sure if its good idea, because there's a significant difference with '||'. Usual 'or' is short-circuiting, while this method cannot work that way.

    I thi...

Friday, January 16 2009
1178 Re-implemented support for updating a belongs to association from the foreign... was updated in Ruby on Rails
  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 7:42 AM

    Consider this:

    parent = record.parent

    old_id = parent.id

    record.parent_id = new_id

    assert_equal old_id, parent.id # will not fail

    record.parent # here parent di...

  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 6:43 AM

    Change detection is indeed placed in proxy in my patch. But the code which should run this detection and drop the proxy should not IMO belong to proxy. That's b...

Tuesday, January 13 2009
1178 Re-implemented support for updating a belongs to association from the foreign... was updated in Ruby on Rails
  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 9:08 AM

    Uploading. But I'm not happy with it right now. The problem is that there are many places where association is read (via #instance_variable_get), and all that p...

Monday, January 12 2009
1178 Re-implemented support for updating a belongs to association from the foreign... was updated in Ruby on Rails
  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 7:54 AM

    Ok. Will do that today.

  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 7:13 AM

    I still think that doing this in attribute writer is not ok.

    When someone overrides attribute writer he/she uses 'write_attribute' and not 'super' to invoke ori...

Friday, November 28 2008
63 [BUG] rake db:create and observers was updated in Ruby on Rails
  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 3:42 PM

    Ah. I forgot to mention that Gerrit's patch fixed the problem for us.

  • Aliaksey Kandratsenka
    Aliaksey Kandratsenka commented at 3:41 PM

    After Gerrit's patch db:drop stopped working for mysql. That's because mysql connection wasn't established before call to #drop_database. I'm attaching a trivia...