@ -11,8 +11,10 @@ class User < ActiveRecord::Base
:confirmable,
:lockable
validates :first_name, :last_name, :presence => true
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me
attr_accessible :email, :password, :password_confirmation, :remember_me, :first_name, :last_name
has_many :records
end
@ -9,6 +9,12 @@
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :first_name %><br />
<%= f.text_field :first_name %></div>
<div><%= f.label :last_name %><br />
<%= f.text_field :last_name %></div>
<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
@ -7,6 +7,12 @@
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
@ -0,0 +1,6 @@
class AddNamesToUsers < ActiveRecord::Migration
def change
add_column :users, :first_name, :string #, :null => false
add_column :users, :last_name, :string #, :null => false