Sha256: 5811480ea316ac9b579a25fcc01faa8a28eaab5d646eddb1827bfaf8b3fe841d

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 Bytes

Contents

module LostInTranslations
  module ActiveRecord

    module ClassMethods

      def define_translation_methods
        LostInTranslations.define_translation_methods self, *translation_fields
      end

    end

    def self.included(base_class)
      base_class.send(:include, Base)
      base_class.extend ClassMethods
    end

    def call_original_field(object, field)
      object.read_attribute(field)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lost_in_translations-1.4.0 lib/lost_in_translations/active_record.rb