I have a field that takes in the users email
<%= 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 %>
Every time I load the page, the email text box has a ' inserted already, and the user has to delete it to insert their email properly.
When I expect the element using chrome. I can see that the value for the email field is is "'". How do I delete it? Thanks in advance
EDIT:
User.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
you should have a
form_for @user(or similar) line above. The local variable is filled by your controller. Look at the controller code, if there is something that fills in the “‘” or look at the model if there is a default, that sets the email field to “‘”.To change the schema definition of the user data create a new db mirgration:
This will create a new file in /db/migrate with a migration definition with two functions:
This should update your data base definition.