<commit_before>class UpsellPagesController < ApplicationController
  before_filter :authenticate_user!
  before_filter :get_club_and_upsell_page, :only => [ :edit, :update ]

  def edit
    authorize! :update, @upsell_page

    render :text => '', :layout => "mercury"
  end

  private

  def get_club_and_upsell_page
    @club        = Club.find params[:club_id]
    @upsell_page = @club.upsell_page
  end
end<commit_msg>Add show Action to UpsellPagesController<commit_after>class UpsellPagesController < ApplicationController
  before_filter :authenticate_user!, :except => [ :show ]
  before_filter :get_club_and_upsell_page

  def show
    unless can?(:read, @upsell_page)
      flash[:error] = "Club Owner is not verified - please let them know they need to verify their account!"

      redirect_to root_path
    end
  end

  def edit
    authorize! :update, @upsell_page

    render :text => '', :layout => "mercury"
  end

  private

  def get_club_and_upsell_page
    @club        = Club.find params[:club_id]
    @upsell_page = @club.upsell_page
  end
end
{'fraction_non_alphanumeric': 0.08826291079812207, 'fraction_numerical': 0.0, 'mean_word_length': 3.8454545454545452, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3301433', 'n_tokens_mistral': 357, 'n_tokens_neox': 343, 'n_words': 87}