Mercurial > hg > soundsoftware-site
comparison app/models/comment.rb @ 929:5f33065ddc4b redmine-1.3
Update to Redmine SVN rev 9414 on 1.3-stable branch
author | Chris Cannam |
---|---|
date | Wed, 27 Jun 2012 14:54:18 +0100 |
parents | cbb26bc654de |
children | 433d4f72a19b |
comparison
equal
deleted
inserted
replaced
909:cbb26bc654de | 929:5f33065ddc4b |
---|---|
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with this program; if not, write to the Free Software | 15 # along with this program; if not, write to the Free Software |
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | 17 |
18 class Comment < ActiveRecord::Base | 18 class Comment < ActiveRecord::Base |
19 include Redmine::SafeAttributes | |
19 belongs_to :commented, :polymorphic => true, :counter_cache => true | 20 belongs_to :commented, :polymorphic => true, :counter_cache => true |
20 belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' | 21 belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' |
21 | 22 |
22 validates_presence_of :commented, :author, :comments | 23 validates_presence_of :commented, :author, :comments |
24 | |
25 safe_attributes 'comments' | |
23 end | 26 end |