<commit_before>require 'pry'

module Thredded
  class MessageboardsController < Thredded::ApplicationController
    def index
      @messageboards = Messageboard.where(closed: false).decorate
    end

    def new
      authorize_creating Messageboard

      @messageboard = Messageboard.new
    end

    def create
      @messageboard = Messageboard.new(messageboard_params)

      if signed_in? && @messageboard.valid? && @messageboard.save
        @topic = Topic.create(topic_params)
        @post = Post.create(post_params)
        @messageboard.add_member(current_user, 'admin')

        redirect_to root_path<commit_msg>[JRO] Remove unnecessary require of pry<commit_after>module Thredded
  class MessageboardsController < Thredded::ApplicationController
    def index
      @messageboards = Messageboard.where(closed: false).decorate
    end

    def new
      authorize_creating Messageboard

      @messageboard = Messageboard.new
    end

    def create
      @messageboard = Messageboard.new(messageboard_params)

      if signed_in? && @messageboard.valid? && @messageboard.save
        @topic = Topic.create(topic_params)
        @post = Post.create(post_params)
        @messageboard.add_member(current_user, 'admin')

        redirect_to root_path
{'fraction_non_alphanumeric': 0.07930214115781126, 'fraction_numerical': 0.0, 'mean_word_length': 3.397212543554007, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5102347', 'n_tokens_mistral': 361, 'n_tokens_neox': 349, 'n_words': 74}