I have a constant called PAYMENT_METHODS in venue.rb.
PAYMENT_METHODS = {'Visa' => 1, 'MasterCard' => 2, 'American Express' => 3, 'Diners' => 4, 'JCB' => 5, 'Bankomat' => 6, 'sodexo' => 7, 'MA-Gutscheine' => 8 }
You can check/uncheck multipe payment types in a form (payment_options is a string):
<%= hidden_field_tag "venue[payment_options][]", nil %>
<% Venue::PAYMENT_METHODS.each do |key, value| %>
<%= f.check_box :payment_options, {:multiple => true}, value %>
<%= label_tag key %>
<% end %>
Now I want to save the values to the single Database Column payment_options, e.g. [1,3,5]. No matter what I check, it always saves 0. What am I doing wrong? I am using PostgreSQL.
Thanks in advance