Leonel *.* wrote in post #965158: > I'm working on a datepicker and a timepicker. The datepicker is the > jQuery datepicker. The timepicker displays a drop down menu with > available times. > > I want to have two different fields: the datepicker and timepicker. Then > mix up the two (probably in the controller) and come up with the whole > datetime data to be inserted into the database. > > The problem is, Rails doesn't seem to let me create two different > fields. > <%= f.label :start_date %><br /> > <%= f.text_field :start_time %> > > I get this error: > Model Appointment does not respond to start_time > > And I understand, start_time doesn't exist in the Model. So how can I > create two fields in the form that don't exist in the model (kinda like > virtual columns) , then combine their two values and then insert the > result into the database?
You're asking the wrong question. Since you want a virtual attribute on the model, just create one with attr_accessor. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.