我有一个接收用户电子邮件的字段
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<div class = "field">Email:
<%= f.email_field :email, :class => "email" %></div>
<% end %>
每次我加载页面时,电子邮件文本框已经'
插入了一个,用户必须删除它才能正确插入他们的电子邮件。
当我期望使用 chrome 的元素时。我可以看到电子邮件字段的值为 is "'"
。我该如何删除它?提前致谢
编辑:
用户.rb
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :username, :firstname, :lastname
# attr_accessible :title, :body
end