Generated model Question with migration
This commit is contained in:
1 parent
cdbba426dd
commit
9921d3b6d6
4 files changed
+25
No files matched your search
@@ -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