instance method expand_keys

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

expand_keys(key)

For a key :‘foo.bar.baz’ return [‘foo’, ‘foo.bar’, ‘foo.bar.baz’]

Parameters

key req
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record.rb, line 51
        def expand_keys(key)
          key.to_s.split(FLATTEN_SEPARATOR).inject([]) do |keys, key|
            keys << [keys.last, key].compact.join(FLATTEN_SEPARATOR)
          end
        end

Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record.rb line 51 · View on GitHub · Improve this page · Find usages on GitHub

Defined in I18n::Backend::ActiveRecord::Implementation

Type at least 2 characters to search.

↑↓ navigate · open · esc close