Sha256: 6a90d41ea0a01071d6eee5119c1d57bafada22da4ec6d412b3573d186f346dd0
Contents?: true
Size: 635 Bytes
Versions: 6
Compression:
Stored size: 635 Bytes
Contents
# frozen_string_literal: true module Thredded class MessageboardGroupsController < Thredded::ApplicationController def new @messageboard_group = MessageboardGroup.new authorize @messageboard_group, :create? end def create @messageboard_group = MessageboardGroup.new(messageboard_group_params) authorize @messageboard_group, :create? if @messageboard_group.save redirect_to root_path else render action: :new end end private def messageboard_group_params params .require(:messageboard_group) .permit(:name) end end end
Version data entries
6 entries across 6 versions & 1 rubygems