diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-06-06 15:51:57 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-11 22:57:29 +0900 |
commit | b01740f9088be49b49f7ed0ca7b73ebbde87bd97 (patch) | |
tree | 5878067ca9da1de7dcab6747647a4faeb25c0a6f /actionpack/test/dispatch/routing_test.rb | |
parent | 701fc768ae34a8824f0c2611214711f1023b057c (diff) | |
download | rails-b01740f9088be49b49f7ed0ca7b73ebbde87bd97.tar.gz rails-b01740f9088be49b49f7ed0ca7b73ebbde87bd97.tar.bz2 rails-b01740f9088be49b49f7ed0ca7b73ebbde87bd97.zip |
Use `inspect` in `type_cast_for_schema` for date/time and decimal values
Currently dumping defaults on schema is inconsistent.
Before:
```ruby
create_table "defaults", force: :cascade do |t|
t.string "string_with_default", default: "Hello!"
t.date "date_with_default", default: '2014-06-05'
t.datetime "datetime_with_default", default: '2014-06-05 07:17:04'
t.time "time_with_default", default: '2000-01-01 07:17:04'
t.decimal "decimal_with_default", default: 1234567890
end
```
After:
```ruby
create_table "defaults", force: :cascade do |t|
t.string "string_with_default", default: "Hello!"
t.date "date_with_default", default: "2014-06-05"
t.datetime "datetime_with_default", default: "2014-06-05 07:17:04"
t.time "time_with_default", default: "2000-01-01 07:17:04"
t.decimal "decimal_with_default", default: "1234567890"
end
```
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
0 files changed, 0 insertions, 0 deletions