# == Schema Information
#
# Table name: users
#
#  id              :integer          not null, primary key
#  email           :text
#  password_digest :text
#  first_name      :text
#  last_name       :text
#  created_at      :datetime         not null
#  updated_at      :datetime         not null
#
# Indexes
#
#  index_users_on_email  (email) UNIQUE
#

class User < ActiveRecord::Base
  has_secure_password

  has_many :flashcards
  has_many :scheduled_reviews

  accepts_nested_attributes_for :flashcards

  def signup_date
    created_at.to_date
  end
end
