jnf / blinder

We use Blinder to collect and review responses to event RFPs.
MIT License
6 stars 8 forks source link

Quick export of Proposal data to txt file. #73

Open jnf opened 10 years ago

jnf commented 10 years ago

Justin requested this as he'd be on an airplane without access. He and I worked out a decent-ish way to dump blind-appropriate Proposal data to a text file. Thinking I should clean it up a bit and make it a rake task.

For reference:

x = Proposal
  .where(safe_for_review: true)
  .collect { |p| [p.responses.reject { |r| r.question.blind.level > 1 }
  .collect { |r| [r.question.label, r.value].join(': ')}, p.slug + "\r\n" + '-' * 80 + "\r\n" * 4]}
  .join("\r\n\r\n")