aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/category.rb')
-rw-r--r--app/models/category.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/category.rb b/app/models/category.rb
index a52a50d..146921b 100644
--- a/app/models/category.rb
+++ b/app/models/category.rb
@@ -25,7 +25,8 @@ class Category < ActiveRecord::Base
validates_presence_of :name
- has_many :questions
+ has_many :question_categories
+ has_many :questions, :through => :question_categories
has_many :user_categories
has_many :users, :through => :user_categories, :accessible => true