Sha256: 37cc5421097ba80f3c656f11a4f18cb26910b459934139a26e9ca0159921fa73

Contents?: true

Size: 846 Bytes

Versions: 26

Compression:

Stored size: 846 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

      rake_tasks do
        require 'closer/tasks'
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
daddy-0.5.25 lib/daddy/rails/railtie.rb
daddy-0.5.24 lib/daddy/rails/railtie.rb
daddy-0.5.23 lib/daddy/rails/railtie.rb
daddy-0.5.22 lib/daddy/rails/railtie.rb
daddy-0.5.21 lib/daddy/rails/railtie.rb
daddy-0.5.20 lib/daddy/rails/railtie.rb
daddy-0.5.19 lib/daddy/rails/railtie.rb
daddy-0.5.18 lib/daddy/rails/railtie.rb
daddy-0.5.17 lib/daddy/rails/railtie.rb
daddy-0.5.16 lib/daddy/rails/railtie.rb
daddy-0.5.15 lib/daddy/rails/railtie.rb
daddy-0.5.14 lib/daddy/rails/railtie.rb
daddy-0.5.13 lib/daddy/rails/railtie.rb
daddy-0.5.12 lib/daddy/rails/railtie.rb
daddy-0.5.11 lib/daddy/rails/railtie.rb
daddy-0.5.10 lib/daddy/rails/railtie.rb
daddy-0.5.9 lib/daddy/rails/railtie.rb
daddy-0.5.8 lib/daddy/rails/railtie.rb
daddy-0.5.7 lib/daddy/rails/railtie.rb
daddy-0.5.6 lib/daddy/rails/railtie.rb