Updated

db/migrate / 20150820161504_insert_constituencies.rb

A
14 lines of codes
2 methods
5.1 complexity/method
1 churn
10.24 complexity
0 duplications
class InsertConstituencies < ActiveRecord::Migration
  1. InsertConstituencies has no descriptive comment
def up
  1. InsertConstituencies#up doesn't depend on instance state (maybe move it to another class?)
constituency_ids = ConstituencyPetitionJournal.distinct.pluck(:constituency_id) constituency_ids.each do |constituency_id| signature = Signature.where(constituency_id: constituency_id).order(nil).first signature.constituency if signature end end def down
  1. InsertConstituencies#down doesn't depend on instance state (maybe move it to another class?)
Constituency.delete_all end end