我有形式:
<%= form_for(@event) do |f| %>
<div class="field">
<%= f.label :title %><br />
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :date %><br />
<%= f.text_field :date %>
</div>
<div class="field">
<%= f.label :repeat %><br />
<%= repeat_types = ['none', 'daily', 'monthly', 'yearly']
f.select :repeat, repeat_types %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
我需要将更改的数据保存到“重复”字段中:
:repeat = Event.rule(:date,:repeat)
在将重复字段保存到数据库之前,我在哪里以及如何修改它?