Permalink
Browse files

Implmented updating index on update

  • Loading branch information...
1 parent 5ba8e1f commit 2acc3470798f2837fb58a0126416f1128a286a81 Makoto Inoue committed Nov 12, 2008
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/tc_adapter.rb
View
7 lib/tc_adapter.rb
@@ -83,9 +83,12 @@ def update(attributes, query)
end
# Creating index for each attributes except id
+ debugger
+ attributes = attributes.map{|k,v| k.name => v}
+
attributes.each do |key, value|
- unless key.name == :id
- access_data(query.model, key.name) do |item|
+ unless key == :id
+ access_data(query.model, key) do |item|
item.putlist(value, [item_id])
end
end

0 comments on commit 2acc347

Please sign in to comment.