Generated model Question with migration

This commit is contained in:
Prelang Builder
2014-02-27 23:58:55 +00:00
committed by u7482
parent cdbba426dd
commit 9921d3b6d6
4 changed files with 25 additions and 0 deletions

2
app/models/question.rb Normal file
View File

@@ -0,0 +1,2 @@
class Question < ActiveRecord::Base
end

View File

@@ -0,0 +1,9 @@
class CreateQuestions < ActiveRecord::Migration
def change
create_table :questions do |t|
t.text :title
t.timestamps
end
end
end

7
test/fixtures/questions.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
title: MyText
two:
title: MyText

View File

@@ -0,0 +1,7 @@
require 'test_helper'
class QuestionTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end