question builder

This commit is contained in:
Stella 2014-02-09 18:05:57 +02:00
parent 4356616566
commit 3105c8da5d
28 changed files with 338 additions and 15 deletions

8
app/models/answer.rb Normal file
View file

@ -0,0 +1,8 @@
class Answer < ActiveRecord::Base
attr_accessible :title
has_many :qanswers
has_many :questions, :through => :qanswers
validates :title, :presence => true
end