rails/rails — pull request #14017 by mru2 (2014-02-11 17:20:13+00:00)
Title: Convert enum values in ActiveRecord::Base#attributes

When calling `#attributes` on a model with enum fields, the resulting hash contains the enum values and not the labels. This PR makes the following change :

```
class Book < ActiveRecord::Base
enum status: [:proposed, :written, :published]
end

book = Book.new(:status => :written)
book.status # => "written"

# Before
book.attributes # => {"id" => nil, "status" => 1}

# After
book.attributes # => {"id" => nil, "status" => "written"}
```

Sorry if this is voluntary and not an omission, I didn't see any mention of this in the discussions related to the `ActiveRecord::Enum` feature