Commit f91049845ae84e1f4867105a886d56d2f0be49d6

Authored by Georg Hopp
1 parent b53333f8

add lxd_host model

  1 +class LxdHost < ActiveRecord::Base
  2 + has_secure_password
  3 +end
  1 +class CreateLxdHosts < ActiveRecord::Migration
  2 + def change
  3 + create_table :lxd_hosts do |t|
  4 + t.text :name
  5 + t.text :uri
  6 + t.string :password_digest
  7 +
  8 + t.timestamps null: false
  9 + end
  10 + end
  11 +end
  1 +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
  2 +
  3 +one:
  4 + name: MyText
  5 + uri: MyText
  6 + password_digest: <%= BCrypt::Password.create('secret') %>
  7 +
  8 +two:
  9 + name: MyText
  10 + uri: MyText
  11 + password_digest: <%= BCrypt::Password.create('secret') %>
  1 +require 'test_helper'
  2 +
  3 +class LxdHostTest < ActiveSupport::TestCase
  4 + # test "the truth" do
  5 + # assert true
  6 + # end
  7 +end
Please register or login to post a comment