mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Implemented strong_parameters for Category/CategoriesController.
Category now requires parameters to be permitted by strong_parameters using #require or #permit for mass-assignment. Missing required parameters now throw a ActionController::ParameterMissing execption instead of the Discourse::InvalidParameters execption.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
class Category < ActiveRecord::Base
|
||||
include ActiveModel::ForbiddenAttributesProtection
|
||||
|
||||
belongs_to :topic, dependent: :destroy
|
||||
belongs_to :topic_only_relative_url,
|
||||
select: "id, title, slug",
|
||||
|
||||
Reference in New Issue
Block a user