Class: LightService::LocalizationAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/light-service/localization_adapter.rb

Instance Method Summary collapse

Instance Method Details

#failure(message_or_key, action_class, options = {}) ⇒ Object



3
4
5
6
7
# File 'lib/light-service/localization_adapter.rb', line 3

def failure(message_or_key, action_class, options = {})
  find_translated_message(message_or_key,
                          action_class.to_s.underscore,
                          options.merge(:type => :failures))
end

#success(message_or_key, action_class, options = {}) ⇒ Object



9
10
11
12
13
# File 'lib/light-service/localization_adapter.rb', line 9

def success(message_or_key, action_class, options = {})
  find_translated_message(message_or_key,
                          action_class.to_s.underscore,
                          options.merge(:type => :successes))
end