Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
akiratosetiawan committed Jul 13, 2014
1 parent 83b9178 commit b991436
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/tps.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class Tps < ActiveRecord::Base
self.table_name = "tps_barus"
def c1_url
return "http://scanc1.kpu.go.id/viewp.php?f=#{self.kelurahan_id}#{self.tps_id.rjust(3, '0')}04.jpg"
end
Expand Down
52 changes: 51 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,56 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 0) do
ActiveRecord::Schema.define(version: 20140713144131) do

create_table "crowd_inputs", force: true do |t|
t.integer "user_id"
t.integer "tps_id"
t.integer "prabowo_count"
t.integer "jokowi_count"
t.integer "broken_count"
t.text "problem"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "tps", force: true do |t|
t.string "desa"
t.string "kelurahan_id"
t.string "tps_id"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "tps_barus", force: true do |t|
t.string "desa"
t.string "kelurahan_id"
t.string "tps_id"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "users", force: true do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
t.string "provider"
t.string "uid"
t.string "name"
t.string "image"
t.boolean "is_banned", default: false
end

add_index "users", ["email"], name: "index_users_on_email", unique: true
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true

end

0 comments on commit b991436

Please sign in to comment.