Module: Silverdot::LocalizeHelper
- Defined in:
- lib/silverdot/helpers/localize_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
- #localize_with_alternative(*args) ⇒ Object (also: #l)
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/silverdot/helpers/localize_helper.rb', line 3 def self.included(base) base.alias_method_chain :localize, :alternative end |
Instance Method Details
#localize_with_alternative(*args) ⇒ Object Also known as: l
7 8 9 10 11 12 13 |
# File 'lib/silverdot/helpers/localize_helper.rb', line 7 def localize_with_alternative(*args) if args[0].is_a?(Alternative) args[0] else localize_without_alternative(*args) end end |