プロジェクト

全般

プロフィール

« | » 

リビジョン 5785342c

高徹 高橋 徹 さんが約6年前に追加

[phase-1]generate model GlossaryTerm

差分を表示:

app/models/glossary_term.rb
class GlossaryTerm < ActiveRecord::Base
end
db/migrate/001_create_glossary_terms.rb
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
test/unit/glossary_term_test.rb
require File.expand_path('../../test_helper', __FILE__)
class GlossaryTermTest < ActiveSupport::TestCase
# Replace this with your real tests.
def test_truth
assert true
end
end

他の形式にエクスポート: Unified diff