lib/scoped_search/definition.rb in scoped_search-2.4.0 vs lib/scoped_search/definition.rb in scoped_search-2.4.1
- old
+ new
@@ -174,10 +174,10 @@
# this method return definitions::field object from string
def field_by_name(name)
field = fields[name.to_sym] unless name.blank?
if field.nil?
dotted = name.to_s.split('.')[0]
- field = fields[dotted.to_sym] unless dotted.nil?
+ field = fields[dotted.to_sym] unless dotted.blank?
end
field
end
# this method is used by the syntax auto completer to suggest operators.