Module: DmForum::PermittedParams
- Included in:
- Admin::ForumCategoriesController, Admin::ForumSitesController, Admin::ForumsController, ForumCommentsController, ForumTopicsController
- Defined in:
- app/models/dm_forum/permitted_params.rb
Instance Method Summary collapse
-
#forum_category_params ⇒ Object
——————————————————————————.
-
#forum_comment_params ⇒ Object
——————————————————————————.
-
#forum_params ⇒ Object
——————————————————————————.
-
#forum_site_params ⇒ Object
——————————————————————————.
-
#forum_topic_params ⇒ Object
——————————————————————————.
Instance Method Details
#forum_category_params ⇒ Object
10 11 12 |
# File 'app/models/dm_forum/permitted_params.rb', line 10 def forum_category_params params.require(:forum_category).permit! if can? :manage_forums, :all end |
#forum_comment_params ⇒ Object
29 30 31 32 33 34 35 |
# File 'app/models/dm_forum/permitted_params.rb', line 29 def forum_comment_params if can? :manage_forums, :all params.require(:forum_comment).permit! else params.require(:forum_comment).permit(:title, :body) end end |
#forum_params ⇒ Object
15 16 17 |
# File 'app/models/dm_forum/permitted_params.rb', line 15 def forum_params params.require(:forum).permit! if can? :manage_forums, :all end |
#forum_site_params ⇒ Object
5 6 7 |
# File 'app/models/dm_forum/permitted_params.rb', line 5 def forum_site_params params.require(:forum_site).permit! if can? :manage_forums, :all end |
#forum_topic_params ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/models/dm_forum/permitted_params.rb', line 20 def forum_topic_params if can? :manage_forums, :all params.require(:forum_topic).permit! else params.require(:forum_topic).permit(:title, :body) end end |