Sha256: 82cbb05a960dc654f20a619f189ab92fbb2bcf1971b6669eedea3f5015aacc1e
Contents?: true
Size: 1.16 KB
Versions: 16
Compression:
Stored size: 1.16 KB
Contents
module DmForum module PermittedParams #------------------------------------------------------------------------------ def forum_site_params params.require(:forum_site).permit! if can? :manage_forums, :all end #------------------------------------------------------------------------------ def forum_category_params params.require(:forum_category).permit! if can? :manage_forums, :all end #------------------------------------------------------------------------------ def forum_params params.require(:forum).permit! if can? :manage_forums, :all end #------------------------------------------------------------------------------ def forum_topic_params if can? :manage_forums, :all params.require(:forum_topic).permit! else params.require(:forum_topic).permit(:title, :body) end end #------------------------------------------------------------------------------ def forum_comment_params if can? :manage_forums, :all params.require(:forum_comment).permit! else params.require(:forum_comment).permit(:title, :body) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems