thetron / mongoid-enum

Sweet enum sugar for your Mongoid documents
MIT License
117 stars 165 forks source link

convert :to_sym on read as well #29

Closed tomasc closed 8 years ago

tomasc commented 8 years ago

We have run into situations where the attr accessors return String instead of expected Symbol.

To enforce the expected behaviour I added explicit to_sym on the two dynamically generated getter methods.

tomasc commented 8 years ago

This is actually connected to a bigger issue here:

https://jira.mongodb.org/browse/RUBY-1075?jql=project%20%3D%20RUBY%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC%2C%20key%20DESC

Closing this.