security, user index

This commit is contained in:
jomo
2013-06-24 16:49:58 +02:00
parent b4f2dc5fab
commit c5dfdbeb8f
13 changed files with 125 additions and 140 deletions

View File

@@ -1,6 +1,6 @@
class Comment < ActiveRecord::Base
attr_accessible :text, :user_id, :blogpost, :post
validates_presence_of :text, :user_id, :blogpost_id
attr_accessible :text, :user, :blogpost, :post
validates_presence_of :text, :user, :blogpost
belongs_to :blogpost
belongs_to :user
end