RAILS 3.2: How to use check_box to save on ActiveRecord?
===

I am unable to get around to a simple check_box which has failed to be saved in the Active Record. I have tried with datatype in active record ranging from string, integer to boolean.

I have tried f.check_box :calories_tapered and other possibilities using APIDock and api.rubyonrails.org.

Overall, I do not quite understand how check_box works, please do show examples that worked so I can understand it better.

Is it possible to create my own value in check_box other than boolean such as integer, string?


    <%= form_for([@user, @user.calories_journals.build]) do |f| %>
          Calories Tapered? <%= f.check_box :calories_tapered, checked_value: true, unchecked_value: false, checked: true %>    
          <%= f.submit "Generate Calories Journals", class: "btn btn-large btn-primary" %>
        <% end %>

Thank you for your time.

