Add new resource for certs

This commit is contained in:
Martin Lensment 2015-02-25 16:26:09 +02:00
parent 143fb7eb1b
commit 5319db16b4
12 changed files with 310 additions and 33 deletions

View file

@ -0,0 +1,15 @@
class CreateCertificates < ActiveRecord::Migration
def change
create_table :certificates do |t|
t.integer :api_user_id
t.text :csr
t.text :crt
t.timestamps
end
ApiUser.all.each do |x|
x.certificates << Certificate.new(crt: x.crt, csr: x.csr)
end
end
end