Require File Before & After Rails Load

In config/application.rb

#----File to Load Before Rails Load-----#
require File.expand_path('../app/models/extenstions/active_record_base_extenstion', File.dirname(__FILE__))


module ProjectName
  class Application < Rails::Application
    config.autoload_paths << File.join(config.root, "lib")
    config.i18n.default_locale = :en
  #------Code in application.rb-----
    config.to_prepare do
      Devise::SessionsController.skip_before_filter :verify_is_admin, :authenticate_admin!
      Devise::PasswordsController.skip_before_filter :subdomain

#----File to Load After Rails Load-----#
require "#{Rails.root}/app/models/extenstions/active_record_base_extenstion"

I am Senior Software Engineer. I love reading, writing, sharing,developing, hiking, movies, trips, mountains, brooks, hills etc.

Tagged with:
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: