File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
activerecord/lib/active_record/connection_adapters Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ def binary_to_string(value)
161
161
162
162
def value_to_date ( value )
163
163
if value . is_a? ( String )
164
- return nil if value . blank ?
164
+ return nil if value . empty ?
165
165
fast_string_to_date ( value ) || fallback_string_to_date ( value )
166
166
elsif value . respond_to? ( :to_date )
167
167
value . to_date
@@ -172,14 +172,14 @@ def value_to_date(value)
172
172
173
173
def string_to_time ( string )
174
174
return string unless string . is_a? ( String )
175
- return nil if string . blank ?
175
+ return nil if string . empty ?
176
176
177
177
fast_string_to_time ( string ) || fallback_string_to_time ( string )
178
178
end
179
179
180
180
def string_to_dummy_time ( string )
181
181
return string unless string . is_a? ( String )
182
- return nil if string . blank ?
182
+ return nil if string . empty ?
183
183
184
184
dummy_time_string = "2000-01-01 #{ string } "
185
185
@@ -192,7 +192,7 @@ def string_to_dummy_time(string)
192
192
193
193
# convert something to a boolean
194
194
def value_to_boolean ( value )
195
- if value . is_a? ( String ) && value . blank ?
195
+ if value . is_a? ( String ) && value . empty ?
196
196
nil
197
197
else
198
198
TRUE_VALUES . include? ( value )
You can’t perform that action at this time.
0 commit comments