title: Rails Formbuilder Question
body: <p>I'm working a project that has recurring, weekly events. Thus, I use several DateTime fields in a nontraditional way. What I'm working on is a FormBuilder that creates a field that outputs a select for a weekday, and a select for time. I'm using a twelve-hour plugin I found online, so that works:</p>
  
  <pre><code>class ActionView::Helpers::FormBuilder
    def dow_time(dow,time,options={})
      rval = select(dow, DateTime::DAYNAMES)
      rval += time_select(time, {:minute_step =&gt; 15, :ignore_date =&gt; false, :twelve_hour =&gt; true})
    end
  end
  </code></pre>
  
  <p>The problem I'm having is that the weekday select doesn't actually have a default selected value. This works fine on my create pages, but not on the edit pages. dow is a symbol that references the field in the calling model where the day of the week string is "Monday", "Tuesday", etc. How can I pull that value out of the calling model using dow.</p>
  
  <pre><code>self[dow]
  </code></pre>
  
  <p>Doesn't work since this is in a different class.</p>
  
  <p>Any ideas? Something different?</p>