From 6c3648cafea9c5ce92c3a436e762e3e5fe587309 Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Thu, 26 Mar 2020 20:50:45 +0200 Subject: [PATCH] Fix user.rb, applicaiton.rb and routes.rb --- app/models/user.rb | 2 +- config/application.rb | 2 +- config/routes.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 8049649..5245ec5 100755 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -48,7 +48,7 @@ class User < ActiveRecord::Base 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_many :bans, :dependent => :destroy has_many :articles, :dependent => :destroy diff --git a/config/application.rb b/config/application.rb index 419c97d..9c20383 100644 --- a/config/application.rb +++ b/config/application.rb @@ -14,7 +14,7 @@ module Ensl config.exceptions_app = self.routes # Load Rails 5 - config.load_defaults 5.0 + # config.load_defaults 5.0 # Additional assets config.assets.precompile += ["themes/*/theme.css", "themes/*/errors.css"] diff --git a/config/routes.rb b/config/routes.rb index 4acbd21..661d395 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Ensl::Application.routes.draw do - if not Rails.env.development? + if Rails.env.production? %w(403 404 422 500).each do |code| get code, to: "errors#show", code: code end