Permalink
Browse files

Added patch from Tekin Suleyman regarding primary keys in the refresh…

… task
  • Loading branch information...
1 parent ff6e848 commit 7d29d06d48829f93563ffdeb34ca834943ba16b2 @jyurek jyurek committed Nov 5, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 tasks/paperclip_tasks.rake
@@ -17,7 +17,7 @@ end
def for_all_attachments
klass = obtain_class
names = obtain_attachments
- ids = klass.connection.select_values("SELECT id FROM #{klass.table_name}")
+ ids = klass.connection.select_values("SELECT #{klass.primary_key} FROM #{klass.table_name}")
ids.each do |id|
instance = klass.find(id)

0 comments on commit 7d29d06

Please sign in to comment.