Module: AuthAssistant::Helpers::AuthLabel
- Defined in:
- lib/auth_assistant/translate/authlabels.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
18 19 20 |
# File 'lib/auth_assistant/translate/authlabels.rb', line 18 def self.included(base) base.helper_method :auth_labels end |
Instance Method Details
#auth_labels ⇒ Object
4 5 6 |
# File 'lib/auth_assistant/translate/authlabels.rb', line 4 def auth_labels @auth_labels ||= translate_labels end |
#translate_labels ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/auth_assistant/translate/authlabels.rb', line 8 def translate_labels ns_actions = 'auth_assistant.actions' labels = {} %w{new edit delete show sign_in sign_out sign_up edit_registration}.each do |action| labels[action.to_sym] = t "#{ns_actions}.#{action}" end labels[:confirm] = t 'auth_assistant.confirm' labels end |