I have an application where when users sign up they get to choose the day of the week they would like to describe. Each User has a mondaysub, tuesdaysub, etc (all strings) to store whether or not they are to receive an email on those days. For some other reasons, I need to keep it so that f or t mark in each column to designate subscribed to each day or not.
Currently I have:
<% form_for @user do |f| %>
<h3>Please select the days you would like to recieve a trailer!</h3>
<%= f.check_box :mondaysub, {}, "t", "f" %> <label>Monday</label>
<%= f.check_box :tuesdaysub, {}, "t", "f" %> <label>Tuesday</label>
<%= f.check_box :wednesdaysub, {}, "t", "f" %> <label>Wednesday</label>
<%= f.check_box :thursdaysub, {}, "t", "f" %> <label>Thursday</label>
<%= f.check_box :fridaysub, {}, "t", "f" %> <label>Friday</label><br>
<%= f.check_box :saturdaysub, {}, "t", "f" %> <label>Saturday</label>
<%= f.check_box :sundaysub, {}, "t", "f" %> <label>Sunday</label><br>
<p><%= f.submit "Subscribe Me!" %></p>
<% end %>
My question is... is there a better way to allow users to select which days of the week they want to receive mail on (more user friendly then checking individual boxes) but I still get the data stored how I need it to. Also, I would like the users to see what they are subscribed to when they come back to edit.
Thanks!