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