Improve how ruby features are required

* Don't require bcrypt explicitly (done by bundler);
* Regroup require calls in application configuration.
This commit is contained in:
Thibault Jouan 2015-04-30 11:28:07 +00:00
parent 16cccc2a23
commit b13efc5a4c
4 changed files with 2 additions and 6 deletions

View File

@ -1,5 +1,3 @@
require 'fileutils'
class Sound < ActiveRecord::Base class Sound < ActiveRecord::Base
belongs_to :track belongs_to :track

View File

@ -1,5 +1,3 @@
require 'bcrypt'
class User < ActiveRecord::Base class User < ActiveRecord::Base
include BCrypt include BCrypt

View File

@ -12,6 +12,8 @@ require 'action_view/railtie'
# you've limited to :test, :development, or :production. # you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups) Bundler.require(*Rails.groups)
require 'fileutils'
module Scube module Scube
class Application < Rails::Application class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here. # Settings in config/environments/* take precedence over those specified here.

View File

@ -1,5 +1,3 @@
require 'bcrypt'
module BCrypt module BCrypt
class Engine class Engine
remove_const :DEFAULT_COST remove_const :DEFAULT_COST