Method: Object#rs_
- Defined in:
- lib/record_select/extensions/localization.rb
#rs_(key, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/record_select/extensions/localization.rb', line 5 def rs_(key, = {}) unless key.blank? text = I18n.translate "#{key}", {:scope => [:record_select], :default => key.is_a?(String) ? key : key.to_s.titleize}.merge() # text = nil if text.include?('translation missing:') end text ||= key text end |