diff options
author | George Claghorn <george.claghorn@gmail.com> | 2015-05-15 23:27:41 -0400 |
---|---|---|
committer | George Claghorn <george.claghorn@gmail.com> | 2015-05-27 21:48:58 -0400 |
commit | 908cfef6e2f2c888e02b89fc74888786efda2a45 (patch) | |
tree | 9674dec4166259eb74133c8a845bf04862db3050 /activerecord/test/cases/invalid_connection_test.rb | |
parent | 27fdf4591d06d11728649714bdaf0a006908861b (diff) | |
download | rails-908cfef6e2f2c888e02b89fc74888786efda2a45.tar.gz rails-908cfef6e2f2c888e02b89fc74888786efda2a45.tar.bz2 rails-908cfef6e2f2c888e02b89fc74888786efda2a45.zip |
Resolve enums in test fixtures
Currently, values for columns backing Active Record enums must be
specified as integers in test fixtures:
awdr:
title: "Agile Web Development with Rails"
status: 2
rfr:
title: "Ruby for Rails"
status: <%= Book.statuses[:proposed] %>
This is potentially confusing, since enum values are typically
specified as symbols or strings in application code. To resolve the
confusion, this change permits the use of symbols or strings to specify
enum values:
awdr:
status: :published
It is compatible with fixtures that specify enum values as integers.
Diffstat (limited to 'activerecord/test/cases/invalid_connection_test.rb')
0 files changed, 0 insertions, 0 deletions