Sha256: 90e409e53ca0b51ee1648824b84fb5d1871b33c4eee9ff1eb625fe6f197bbcb4

Contents?: true

Size: 501 Bytes

Versions: 2

Compression:

Stored size: 501 Bytes

Contents

module Sugar
  autoload :ActiveRecord, 'sugar/active_record'
  autoload :ActionView, 'sugar/action_view'
  autoload :ActionController, 'sugar/action_controller'

  def self.locale_files
    Dir[File.join(File.dirname(__FILE__), 'sugar', 'locales', '*')]
  end
end

if defined? Rails
  ActionView::Base.send :include, Sugar::ActionView if defined? ActionView
  ActionController::Base.send :include, Sugar::ActionController if defined? ActionController
  I18n.load_path.unshift(*Sugar.locale_files)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sugar-0.0.42 lib/sugar.rb
sugar-0.0.41 lib/sugar.rb