Skip to content

Commit

Permalink
properly quote any value (also fixes Time value generation)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhalff committed May 22, 2011
1 parent 5f3f169 commit 9b40b90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tasks/seed_dump.rake
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ namespace :db do

attr_s = [];

puts r.inspect

id_set_string = ''
r.attributes.each { |k,v|
v = v.class == Time ? "\"#{v}\"" : v.inspect
v = r.attribute_for_inspect(k)
if k == 'id' && opts['with_id']
id_set_string = "{ |c| c.#{k} = #{v} }.save"
else
Expand Down

0 comments on commit 9b40b90

Please sign in to comment.