Bläddra i källkod

Drop sex from candidates

tags/last-sinatra-version
Adrian Short 12 år sedan
förälder
incheckning
611cdbb1a0
2 ändrade filer med 2 tillägg och 3 borttagningar
  1. +1
    -2
      models.rb
  2. +1
    -1
      scripts/merge-candidates.rb

+ 1
- 2
models.rb Visa fil

@@ -90,8 +90,7 @@ class Candidate
property :id, Serial property :id, Serial
property :forenames, String, :required => true property :forenames, String, :required => true
property :surname, String, :required => true, :index => true property :surname, String, :required => true, :index => true
property :sex, String

has n, :candidacies has n, :candidacies
def short_name def short_name


+ 1
- 1
scripts/merge-candidates.rb Visa fil

@@ -5,7 +5,7 @@ def show_candidate(id)
template = "%6s\t%50s\t%20s\t%3s" template = "%6s\t%50s\t%20s\t%3s"
puts template % [ c.id, c.forenames, c.surname, c.sex ]
puts template % [ c.id, c.forenames, c.surname ]
ccy_template = "%20s\t%15s\t%20s\t%20s" ccy_template = "%20s\t%15s\t%20s\t%20s"
c.candidacies.each do |ccy| c.candidacies.each do |ccy|


Laddar…
Avbryt
Spara