jeffp/enumerated_attribute — Issue #41: Postgres doesn't seem to correctly save values
Author: BluebirdProjects
Created: 2012-01-25 11:07:19+00:00
State: open

After re-doing migrations to use :string instead of :enum, migrations now succeed for postgres (I used Heroku) per another issue reported... but a postgres issue remains.

On that platform when you submit a form containing f.enum_select after choosing a non-default value, it does not get saved to the database. The default value is the one that gets saved.

In my class I have:

enum_attr :state_owner_submit, %w(^submit_none submit_standard submit_premium)

In my form I have:

= f.label :state_owner_submit, :class => :label
= f.enum_select :state_owner_submit

No matter what I select in the selection box, :submit_none is what gets saved.

It works fine under sqlite.