Permalink
Browse files

Drop false values from prop hash.

  • Loading branch information...
1 parent 3b64efb commit 0969ecb914f757e657cda434c7f955c9f1218a3d @johnnymugs johnnymugs committed with Michael Freedman & Michael Gamba Jun 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/database.rb
View
@@ -11,7 +11,7 @@ def save(table, data)
@database.execute(sql)
data.each do |key, value|
- sql = if value.nil?
+ sql = if value.nil? || value == false
%Q{DELETE FROM #{table} WHERE key = "#{key}"}
else
%Q{INSERT OR REPLACE INTO #{table} (key,value) VALUES ("#{key}", "#{value}")}

0 comments on commit 0969ecb

Please sign in to comment.