Commit bed4d517c57c63b66b032ad5dbd52d9d575a982f

Authored by Luke Baker
1 parent d1ee43f1

update active column in ideas CSV to be CAPS

active column in ideas CSV now has "TRUE" or "FALSE" instead
of "true" or "false"
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
app/models/question.rb
... ... @@ -547,6 +547,7 @@ class Question < ActiveRecord::Base
547 547 when 'ideas'
548 548 self.choices.each do |c|
549 549 user_submitted = c.user_created ? "TRUE" : "FALSE"
  550 + active = c.active ? "TRUE" : "FALSE"
550 551 left_prompts_ids = c.prompts_on_the_left.ids_only
551 552 right_prompts_ids = c.prompts_on_the_right.ids_only
552 553  
... ... @@ -555,7 +556,7 @@ class Question < ActiveRecord::Base
555 556  
556 557 num_skips = self.skips.count(:conditions => {:prompt_id => left_prompts_ids + right_prompts_ids})
557 558  
558   - csv << [c.question_id, c.id, "'#{c.data.strip}'", c.wins, c.losses, num_skips, c.score, user_submitted , c.creator_id, c.created_at, c.updated_at, c.active, left_appearances, right_appearances]
  559 + csv << [c.question_id, c.id, "'#{c.data.strip}'", c.wins, c.losses, num_skips, c.score, user_submitted , c.creator_id, c.created_at, c.updated_at, active, left_appearances, right_appearances]
559 560  
560 561 end
561 562 when 'non_votes'
... ...