Fix user.rb, applicaiton.rb and routes.rb

This commit is contained in:
Ari Timonen 2020-03-26 20:50:45 +02:00
parent dcac8e067a
commit 6c3648cafe
3 changed files with 3 additions and 3 deletions

View file

@ -48,7 +48,7 @@ class User < ActiveRecord::Base
attribute :lastvisit, :datetime, default: Time.now.utc attribute :lastvisit, :datetime, default: Time.now.utc
belongs_to :team, :optional => true, :optional => true belongs_to :team, :optional => true
has_one :profile, :dependent => :destroy has_one :profile, :dependent => :destroy
has_many :bans, :dependent => :destroy has_many :bans, :dependent => :destroy
has_many :articles, :dependent => :destroy has_many :articles, :dependent => :destroy

View file

@ -14,7 +14,7 @@ module Ensl
config.exceptions_app = self.routes config.exceptions_app = self.routes
# Load Rails 5 # Load Rails 5
config.load_defaults 5.0 # config.load_defaults 5.0
# Additional assets # Additional assets
config.assets.precompile += ["themes/*/theme.css", "themes/*/errors.css"] config.assets.precompile += ["themes/*/theme.css", "themes/*/errors.css"]

View file

@ -1,5 +1,5 @@
Ensl::Application.routes.draw do Ensl::Application.routes.draw do
if not Rails.env.development? if Rails.env.production?
%w(403 404 422 500).each do |code| %w(403 404 422 500).each do |code|
get code, to: "errors#show", code: code get code, to: "errors#show", code: code
end end