File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def update_with_custom_messages(custom_messages, lang)
48
48
def update_with_custom_messages_yaml ( yaml )
49
49
begin
50
50
messages = YAML . load ( yaml )
51
- @errs = { base : l ( :error_invalid_yaml_format ) } if messages . is_a? ( Hash ) == false && messages . present?
51
+ @errs = { base : l ( :error_invalid_yaml_format ) } if ! messages . is_a? ( Hash ) && messages . present?
52
52
self . value = { custom_messages : ( messages . present? ? messages : { } ) }
53
53
rescue => e
54
54
@errs = { base : e . message }
@@ -109,7 +109,7 @@ def self.find_language(language=nil)
109
109
private
110
110
111
111
def custom_message_keys_are_available
112
- return false if self . value [ :custom_messages ] . is_a? ( Hash ) == false || self . errors . present?
112
+ return false if ! value [ :custom_messages ] . is_a? ( Hash ) || errors . present?
113
113
114
114
custom_messages_hash = { }
115
115
custom_messages . values . compact . each do |val |
@@ -124,7 +124,8 @@ def custom_message_keys_are_available
124
124
end
125
125
126
126
def custom_message_languages_are_available
127
- return false if self . value [ :custom_messages ] . is_a? ( Hash ) == false || self . errors . present?
127
+ return false if !value [ :custom_messages ] . is_a? ( Hash ) || errors . present?
128
+
128
129
unavailable_languages =
129
130
custom_messages . keys . compact . reject do |language |
130
131
I18n . available_locales . include? ( language . to_sym )
You can’t perform that action at this time.
0 commit comments