[phase-1]generate model GlossaryTerm
This commit is contained in:
parent
fccc7d7bc8
commit
5785342c51
2
app/models/glossary_term.rb
Normal file
2
app/models/glossary_term.rb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
class GlossaryTerm < ActiveRecord::Base
|
||||||
|
end
|
10
db/migrate/001_create_glossary_terms.rb
Normal file
10
db/migrate/001_create_glossary_terms.rb
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
class CreateGlossaryTerms < ActiveRecord::Migration[5.1]
|
||||||
|
def change
|
||||||
|
create_table :glossary_terms do |t|
|
||||||
|
t.string :name, null: false
|
||||||
|
t.text :description
|
||||||
|
|
||||||
|
t.timestamps null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
9
test/unit/glossary_term_test.rb
Normal file
9
test/unit/glossary_term_test.rb
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
require File.expand_path('../../test_helper', __FILE__)
|
||||||
|
|
||||||
|
class GlossaryTermTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
|
# Replace this with your real tests.
|
||||||
|
def test_truth
|
||||||
|
assert true
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user