diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-22 00:51:45 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-22 02:37:07 +0530 |
commit | 6d30002a52133bd105adb29084f4cc72b1ee847f (patch) | |
tree | e2c194d8b454b66daf4db58d770c1337d0c20399 /activerecord/test/cases/types/object_test.rb | |
parent | a68a3e9af6a02c9ce18d3eec87558241095ce8fb (diff) | |
download | rails-6d30002a52133bd105adb29084f4cc72b1ee847f.tar.gz rails-6d30002a52133bd105adb29084f4cc72b1ee847f.tar.bz2 rails-6d30002a52133bd105adb29084f4cc72b1ee847f.zip |
Revert "Refactoring attributes/types" [#3348 state:open]
This reverts commit f936a1f100e75082081e782e5cceb272885c2df7.
Conflicts:
activerecord/lib/active_record.rb
activerecord/lib/active_record/base.rb
Revert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open]
This reverts commit 2831996483c6a045f1f38d8030256eb58d9771c3.
Reason :
It's not generating attribute methods properly, making object.column 5x slower.
Diffstat (limited to 'activerecord/test/cases/types/object_test.rb')
-rw-r--r-- | activerecord/test/cases/types/object_test.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/activerecord/test/cases/types/object_test.rb b/activerecord/test/cases/types/object_test.rb deleted file mode 100644 index f2667a9b00..0000000000 --- a/activerecord/test/cases/types/object_test.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "cases/helper" - -class ObjectTest < ActiveRecord::TestCase - - def setup - @column = ActiveRecord::ConnectionAdapters::Column.new('name', '', 'date') - @object = ActiveRecord::Type::Object.new(@column) - end - - test "typecast with column" do - date = Date.new(2009, 7, 10) - assert_equal date, @object.cast('10-07-2009') - assert_equal nil, @object.cast('') - - assert_equal date, @object.precast(date) - end - - test "cast as boolean" do - assert_equal false, @object.boolean(nil) - assert_equal false, @object.boolean('false') - assert_equal true, @object.boolean('10-07-2009') - end - -end |