[#29911] [Bug #3231] Digest Does Not Build — Charlie Savage <redmine@...>

Bug #3231: Digest Does Not Build

19 messages 2010/05/01

[#29920] [Feature #3232] Loops (while/until) should return last statement value if any, like if/unless — Benoit Daloze <redmine@...>

Feature #3232: Loops (while/until) should return last statement value if any, like if/unless

9 messages 2010/05/01

[#29997] years in Time.utc — Xavier Noria <fxn@...>

Does anyone have a precise statement about the years supported by

13 messages 2010/05/04

[#30010] [Bug #3248] extension 'tk' is finding tclConfig.sh and tkConfig.sh incorrectly — Luis Lavena <redmine@...>

Bug #3248: extension 'tk' is finding tclConfig.sh and tkConfig.sh incorrectly

9 messages 2010/05/05

[#30226] [Bug #3288] Segmentation fault - activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88 — Szymon Jeż <redmine@...>

Bug #3288: Segmentation fault - activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88

10 messages 2010/05/13

[#30358] tk doesn't startup well in doze — Roger Pack <rogerdpack2@...>

Currently with 1.9.x and tk 8.5,the following occurs

12 messages 2010/05/22

[ruby-core:30483] Suggestion for improving value_to_boolean column conversion

From: Jarl Friis <jarl@...>
Date: 2010-05-28 10:59:54 UTC
List: ruby-core #30483
Hi fantastic rails core developers.

Speaking of version 2.3.5:

I find it rather error_prone that values such that "some text" is
silently converted to false when stored in a boolean DB field.

Among other things it means that assign "some text" to boolean fields
on a model will not generate any validation messages (it will silently
be converted to false).

I think it is like silently swallowing exception without knowing what
to do about them.

I will suggest to modify the existing implementation of 
ActiveRecord::ConnectionAdapters::Column::value_to_boolean

to
ActiveRecord::ConnectionAdapters::Column.class_eval %q{
  def self.value_to_boolean(value)
    case value
    when *TRUE_VALUES.to_a: true
    when *FALSE_VALUES.to_a: false
    else nil
    end
  end
}

First of all it simplifies the implementation (getting rid of initial
if. secondly it will at least result in nil if value is neither
recognised among TRUE_VALUES nor FALSE_VALUES



In This Thread

Prev Next