Moved to hash for user data.
This commit is contained in:
parent
900fbf7521
commit
677f5c0e6e
1 changed files with 8 additions and 4 deletions
|
@ -69,12 +69,16 @@ returns
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def search_index_data
|
def search_index_data
|
||||||
data = []
|
puts 'aaaaa'
|
||||||
|
|
||||||
|
attributes = {}
|
||||||
['name', 'note'].each { |key|
|
['name', 'note'].each { |key|
|
||||||
data.push self[key] if self[key]
|
if self[key] && !self[key].empty?
|
||||||
|
attributes[key] = self[key]
|
||||||
|
end
|
||||||
}
|
}
|
||||||
return data[0] if !data[1]
|
return if attributes.empty?
|
||||||
data
|
attributes
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue