<commit_before># -*- coding: utf-8 -*-
require 'lib/asakusa_satellite/config'
class RoomController < ApplicationController
  include RoomHelper
  def delete
    if request.post?
      find_room(@id) do
        @room.deleted = true
        @room.save!
        redirect_to :controller => 'chat', :action => 'index'
      end
    else
      redirect_to :controller => 'chat', :action => 'index'
    end
  end

  def configure
    @id     = params[:id]
    @plugins = AsakusaSatellite::Config.rooms

    find_room(@id) do
      if request.post? then
        @room.update_attributes! params[:room]
      end
    end
  end

  def join
    @id     = params[:id]
    find_room(@id) do
      if @room.joined? current_user then
        @room.leave current_user
        render :json => { :member => false }
      else
        @room.join current_user
        render :json => { :member => true }
      end
    end
  end
end
<commit_msg>部屋が削除できない不具合を修正 refs #486<commit_after># -*- coding: utf-8 -*-
require 'lib/asakusa_satellite/config'
class RoomController < ApplicationController
  include RoomHelper
  def delete
    @id     = params[:id]
    if request.post?
      find_room(@id) do
        @room.deleted = true
        @room.save!
        redirect_to :controller => 'chat', :action => 'index'
      end
    else
      redirect_to :controller => 'chat', :action => 'index'
    end
  end

  def configure
    @id     = params[:id]
    @plugins = AsakusaSatellite::Config.rooms

    find_room(@id) do
      if request.post? then
        @room.update_attributes! params[:room]
      end
    end
  end

  def join
    @id     = params[:id]
    find_room(@id) do
      if @room.joined? current_user then
        @room.leave current_user
        render :json => { :member => false }
      else
        @room.join current_user
        render :json => { :member => true }
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.11146496815286625, 'fraction_numerical': 0.002653927813163482, 'mean_word_length': 2.194915254237288, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '4606246', 'n_tokens_mistral': 609, 'n_tokens_neox': 596, 'n_words': 156}