Add language settings for users, and translate titles to French
This commit is contained in:
@@ -1,3 +1,25 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: contests
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# allow_registration :boolean default(FALSE)
|
||||
# name :string
|
||||
# slug :string
|
||||
# team :boolean default(FALSE)
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# user_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_contests_on_slug (slug) UNIQUE
|
||||
# index_contests_on_user_id (user_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# user_id (user_id => users.id)
|
||||
#
|
||||
FactoryBot.define do
|
||||
factory :contest do
|
||||
name { Faker::Company.unique.name }
|
||||
|
@@ -1,3 +1,20 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: users
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# admin :boolean default(FALSE), not null
|
||||
# email_address :string not null
|
||||
# lang :string default("en")
|
||||
# password_digest :string not null
|
||||
# username :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_users_on_email_address (email_address) UNIQUE
|
||||
#
|
||||
FactoryBot.define do
|
||||
factory :user do
|
||||
username { Faker::Internet.unique.username }
|
||||
|
@@ -1,3 +1,20 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: users
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# admin :boolean default(FALSE), not null
|
||||
# email_address :string not null
|
||||
# lang :string default("en")
|
||||
# password_digest :string not null
|
||||
# username :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_users_on_email_address (email_address) UNIQUE
|
||||
#
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe User, type: :model do
|
||||
|
Reference in New Issue
Block a user