Hi, could you explain what you’re trying to do because this will allow others to better assist you? It seems that you would like the datetime set automatically. If this is the case, then you want to remove the date selection from the form because the created_at field will automatically set by the rails framework. Please read section, “Magic Column Names”, on page 319 of AWDwRv2.
You’ll want to complete Part II of this book and this will provide you with a good foundation to build from. Lastly, you can order the PDF and/or paperback from
Don't bother putting it in your form at all. You can do that server
side. The model is the best place for it, you can use a before filter
to execute all sorts of stuff, but in your case. In your post.rb model
before_create :set_time
def set_time
self.created_at = Time.now
end
In saying all this however, check if rails 2.0 automatically fills
this is for you. Try creating and saving a new record in the console,
as I'm pretty sure that Rails will fill in this field automatically.