Merge pull request #979 from iancmyers/strong-parameters

All parameters for #create in PostsController pass through strong_parameters
This commit is contained in:
Robin Ward
2013-06-07 09:17:29 -07:00
5 changed files with 48 additions and 44 deletions

View File

@@ -162,7 +162,10 @@ Discourse.Post = Discourse.Model.extend({
// We're saving a post
data = {
post: this.getProperties('raw', 'topic_id', 'reply_to_post_number', 'category'),
raw: this.get('raw'),
topic_id: this.get('topic_id'),
reply_to_post_number: this.get('reply_to_post_number'),
category: this.get('category'),
archetype: this.get('archetype'),
title: this.get('title'),
image_sizes: this.get('imageSizes'),