我的导轨_form
代码:
<%= simple_form_for @admin_event, :html => { :class => 'main-form' } do |f| %>
<%= f.input :time_of_event, :format => l(:time_of_event, '%d %b. %Y'), :as => :string, :label => 'Hora', :input_html => { :class => 'thin', :placeholder => 'eg: 20:30' } %>
<% end %>
我收到错误消息:
Cannot convert symbol to string.
我如何设置它_form
以始终使用时间转换器显示此字段,以便在数据库具有完整字段 ( 2000-01-01 19:30:00.000000
) 时,以它只会显示的形式显示19:30
?