Sha256: 1130684c5f3b65818aaecde697c2fb317d41209d4a01fa5be750a0aaa872e6a1

Contents?: true

Size: 425 Bytes

Versions: 1

Compression:

Stored size: 425 Bytes

Contents

require 'translatable/active_record'
  
if defined?(Rails)
  require 'translatable/engine'

  ActiveSupport.on_load(:active_record) do
    ActiveRecord::Base.extend Translatable::ActiveRecord if defined?(I18n)
  end
else
  begin 
    require 'active_record'
    require 'i18n'
      
    ActiveRecord::Base.extend Translatable::ActiveRecord
  rescue LoadError
    $stderr.puts "Warning: Translatable is not loaded"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translatable-0.3.1 lib/translatable.rb