Generated model Question with migration
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
class Question < ActiveRecord::Base
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
class CreateQuestions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :questions do |t|
|
||||
t.text :title
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
title: MyText
|
||||
|
||||
two:
|
||||
title: MyText
|
||||
@@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class QuestionTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
Reference in New Issue
Block a user