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.

There was a problem

You must be a member of this account.

Tomash's latest activity

Tuesday, September 15 2009
3208 belongs_to with :primary_key does not work with find's :include was created in Ruby on Rails
  • Tomash
    Tomash created the ticket at 11:01 AM

    Since 2.3.3 Rails supports both :foreign_key and :primary_key for belongs_to association.
    Using both (or only :primary_key) works great for simple instance.owne...

Sunday, August 10 2008
564 dangerous float operations was updated in Ruby on Rails
  • Tomash
    Tomash commented at 4:32 PM

    I know, I know. We're using INT columnt because of that and convert numbers on-the-fly by overloading amount and amount= methods in our models. But I've just re...

Tuesday, July 08 2008
565 datetime associations work only with hour-containing input was updated in Ruby on Rails
  • Tomash
    Tomash commented at 8:39 AM

    Tried it with a clean app and... damn I'm dumb -- the bug also doesn't occur.

    I've tracked down the bug to have its root in validates_date_time plugin which d...

Monday, July 07 2008
564 dangerous float operations was updated in Ruby on Rails
  • Tomash
    Tomash commented at 3:37 PM

    Update: 8.95 is also a "magical number" inside ActiveRecord, i.e. balance=8.95 sets balance field to 894. Other numbers "around" seem OK.

    >> a.balance=(8.95)
    ...
  • Tomash
    Tomash created the ticket at 3:10 PM

    While implementing storage of price/cost/balance in cents I've stumbled upon one nasty bug. Consider the following code:

    class Account < ActiveRecord::Base
    d...
565 datetime associations work only with hour-containing input was created in Ruby on Rails
  • Tomash
    Tomash created the ticket at 3:20 PM

    I don't know how Rails create accessors based on DBs column type, but accessors for SQL datetime time act weird.

    The problem: assigning string (for example fr...