0

我正在使用 gem 'formtastic'、'2.1' 我的模型:employee.rb

class Employee < ActiveRecord::Base
  attr_accessible :name, :designation, :about
end

我的观点(edit.html.erb)

<%= semantic_form_for [:admin,@employee], :html => { :multipart => true, :class =>"form" } do |f| %>
  <%= f.inputs do %>
    <%= f.input :name, :hint => "should be less then or equal to 30 characters" %>
    <%= f.input :designation %>
    <%= f.input :about, :input_html => { :rows => 5 } %>
  <% end %>

  <%= f.buttons do |button| %>
    <button class="button" type="submit">
    </button>
  <% end %>
<% end %>

现在,当我尝试编辑此页面并单击文本框时,所有文本都被清除了。但我只想编辑(附加或更改数据)我该怎么做?

4

1 回答 1

0

嗯,这是我自己的 javascript 的问题,它在模糊上清除文本。

于 2013-02-07T07:54:23.093 回答