DEV Community

Discussion on: How to add "Preview Mode" style functionality to a Rails application

Collapse
 
swiknaba profile image
Lud

With rail's enum you can also use an integer column. Add an index to this database column (with migration it's enough to pass index: true to the add_colmn method), and your scopes will be much faster and lighter on the database :-)