Sha256: ad6187d45d480165196f17671c6ac6e85adb8cbf2df217951a5ae0b8a3be537c

Contents?: true

Size: 971 Bytes

Versions: 3

Compression:

Stored size: 971 Bytes

Contents

require 'rails_i18n'
require 'holiday_jp'
require 'daddy/helpers/html_helper'
require 'daddy/http_client'
require 'daddy/model'
require 'daddy/ocr'

module Daddy
  module Rails
    class Railtie < ::Rails::Railtie
      config.before_configuration do
        if config.action_view.javascript_expansions
          config.action_view.javascript_expansions[:defaults] |= ['daddy']
        end
      end
  
      initializer 'active_record_extension' do
        ActiveSupport.on_load :active_record do
          require 'daddy/models/crud_extension'
          require 'daddy/models/query_extension'
          ActiveRecord::Base.send(:include, Daddy::Models::CrudExtension)
          ActiveRecord::Base.send(:include, Daddy::Models::QueryExtension)
        end
      end

      initializer 'sidekiq' do
        if defined?(Sidekiq)
          ::Rails.logger.info '[daddy] loading sidekiq configuration'
          require 'daddy/sidekiq'
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
daddy-0.5.30 lib/daddy/rails/railtie.rb
daddy-0.5.29 lib/daddy/rails/railtie.rb
daddy-0.5.28 lib/daddy/rails/railtie.rb