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:
parent
88244da65f
commit
3cb79cac2c
|
@ -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
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class Bookmarks::Bookmark < ActiveRecord::Base
|
||||
acts_as_list scope: :user_id
|
||||
strong_params
|
||||
|
||||
def data
|
||||
json ? JSON.parse(json) : nil
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#
|
||||
|
||||
class GradebookUpload < ActiveRecord::Base
|
||||
strong_params
|
||||
|
||||
belongs_to :course
|
||||
belongs_to :user
|
||||
belongs_to :progress
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#
|
||||
|
||||
class SisPostGradesStatus < ActiveRecord::Base
|
||||
strong_params
|
||||
|
||||
ALLOWED_STATUSES = %w{success warning failed}
|
||||
belongs_to :course
|
||||
belongs_to :course_section
|
||||
|
|
Loading…
Reference in New Issue