Sha256: 49d4bbefe9a6d4e1851b393d7ade9c6e14c9d0b77c08b37808e67b8dcaa06154

Contents?: true

Size: 420 Bytes

Versions: 1

Compression:

Stored size: 420 Bytes

Contents

module Cavy::Localizable
  extend ActiveSupport::Concern

  included do
    def localized_hash_value(hash, locale)
      locales = [locale] + [I18n.locale] + [Cavy.default_locale] + Cavy.locales
      locales.inject('') do |working_title, test_locale|
        if working_title == '' && test_locale.to_s != ''
          working_title = hash[test_locale.to_s]
        end
        working_title
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cavy-0.1.0.beta2 app/models/concerns/cavy/localizable.rb