Skip to content

Instantly share code, notes, and snippets.

@jarib
Created July 1, 2012 11:50
Show Gist options
  • Save jarib/3028147 to your computer and use it in GitHub Desktop.
Save jarib/3028147 to your computer and use it in GitHub Desktop.
Topic/promise example
# temporary topic example
topic = Topic.create!(
title: "Formueskatt",
description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
)
topic.promises << Promise.where(:body => "Opprettholde formueskatten, men gjøre den mer rettferdig.", :party_id => Party.find_by_external_id("A")).first
topic.save!
VoteConnection.create!(:vote => Vote.find_by_external_id(2349), :matches => false, :topic => topic)
VoteConnection.create!(:vote => Vote.find_by_external_id(2351), :matches => true, :topic => topic)
VoteConnection.create!(:vote => Vote.find_by_external_id(2350), :matches => false, :topic => topic)
VoteConnection.create!(:vote => Vote.find_by_external_id(2352), :matches => false, :topic => topic)
VoteConnection.create!(:vote => Vote.find_by_external_id(2354), :matches => true, :topic => topic)
VoteConnection.create!(:vote => Vote.find_by_external_id(2353), :matches => false, :topic => topic)
VoteConnection.create!(:vote => Vote.find_by_external_id(2172), :matches => true, :topic => topic)
VoteConnection.create!(:vote => Vote.find_by_external_id(2171), :matches => false, :topic => topic)
VoteConnection.create!(:vote => Vote.find_by_external_id(1570), :matches => false, :topic => topic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment