mark several models as using strong_params

Change-Id: Ia925f291df671630dd6a30f3a4e566cfebe08d4b
Reviewed-on: https://gerrit.instructure.com/57842
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2015-07-07 11:55:09 -06:00
parent 88244da65f
commit 3cb79cac2c
6 changed files with 10 additions and 1 deletions

View File

@ -148,7 +148,7 @@ class Bookmarks::BookmarksController < ApplicationController
end
def valid_params
params.slice(:name, :url, :data).merge({user_id: user_id})
strong_params.permit(:name, :url).merge(user_id: user_id).merge(params.slice(:data))
end
def set_position

View File

@ -1,5 +1,6 @@
class Bookmarks::Bookmark < ActiveRecord::Base
acts_as_list scope: :user_id
strong_params
def data
json ? JSON.parse(json) : nil

View File

@ -16,6 +16,8 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
class GradebookCsv < ActiveRecord::Base
strong_params
belongs_to :course, inverse_of: :gradebook_csvs
belongs_to :user
belongs_to :attachment

View File

@ -17,6 +17,8 @@
#
class GradebookUpload < ActiveRecord::Base
strong_params
belongs_to :course
belongs_to :user
belongs_to :progress

View File

@ -17,6 +17,8 @@
#
class Quizzes::QuizSubmissionEvent < ActiveRecord::Base
strong_params
include CanvasPartman::Concerns::Partitioned
# An event describing the student choosing an answer to a question.

View File

@ -17,6 +17,8 @@
#
class SisPostGradesStatus < ActiveRecord::Base
strong_params
ALLOWED_STATUSES = %w{success warning failed}
belongs_to :course
belongs_to :course_section