Sha256: a52dc581fb539ecaa48f9408092ce6a8f3af3e2ee00b94ab5ce592549ffb1342
Contents?: true
Size: 390 Bytes
Versions: 1
Compression:
Stored size: 390 Bytes
Contents
module ActsAsLocalized if defined? Rails::Railtie require 'acts_as_localized/railtie' end def self.included(base) base.extend(ClassMethods) end module ClassMethods def acts_as_localized *attributes attributes.each do |attribute| define_method attribute do read_attribute("#{attribute}_#{I18n.locale}") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_localized-0.0.1 | lib/acts_as_localized.rb |