Updated

db/migrate / 20150701145201_create_government_responses.rb

B
13 lines of codes
1 methods
8.2 complexity/method
1 churn
8.21 complexity
38 duplications
class CreateGovernmentResponses < ActiveRecord::Migration
  1. CreateGovernmentResponses has no descriptive comment
def change
  1. Similar code found in 2 nodes Locations: 0 1
  2. CreateGovernmentResponses#change has approx 7 statements
create_table :government_responses do |t|
  1. CreateGovernmentResponses#change has the variable name 't'
t.references :petition
  1. CreateGovernmentResponses#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.string :summary, limit: 500, null: false
  1. CreateGovernmentResponses#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.text :details
  1. CreateGovernmentResponses#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.timestamps null: false
  1. CreateGovernmentResponses#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
end add_index :government_responses, :petition_id, unique: true add_foreign_key :government_responses, :petitions, on_delete: :cascade end end