instance method
parent
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
parent()
No documentation comment.
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/parents.rb, line 7
def parent
@parent ||= begin
segs = to_a.compact
segs.length > 1 ? self.class.tag(*segs[0..(segs.length-2)].join('-')) : nil
end
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/parents.rb line 7
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Locale::Tag::Parents