<commit_before>class Channels::ProfilesController < Channels::BaseController
  layout :use_catarse_boostrap
  inherit_resources
  enable_authorization
  defaults resource_class: Channel, finder: :find_by_permalink!
  actions :show, :edit, :update
  custom_actions resource: [:how_it_works, :new_channel_home]

  before_filter{ params[:id] = request.subdomain }

  private
  def use_catarse_boostrap
    action_name == 'new_channel_home' ? 'catarse_bootstrap' : 'application'
  end
end
<commit_msg>use authorization only for update and edit of channel profile<commit_after>class Channels::ProfilesController < Channels::BaseController
  layout :use_catarse_boostrap
  inherit_resources
  enable_authorization only: [:edit, :update]
  defaults resource_class: Channel, finder: :find_by_permalink!
  actions :show, :edit, :update
  custom_actions resource: [:how_it_works, :new_channel_home]

  before_filter{ params[:id] = request.subdomain }

  private
  def use_catarse_boostrap
    action_name == 'new_channel_home' ? 'catarse_bootstrap' : 'application'
  end
end

{'fraction_non_alphanumeric': 0.08450704225352113, 'fraction_numerical': 0.0, 'mean_word_length': 6.454545454545454, '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': '1077286', 'n_tokens_mistral': 336, 'n_tokens_neox': 328, 'n_words': 76}