<commit_before>class ProfilesController < ApplicationController
  include ProfilesHelper

  before_filter :require_permision, :only=> [:edit, :destroy, :update]

  def index
    scope = Profile.is_published
    if params[:topic]
      @profiles = scope.tagged_with(params[:topic])
    else
      @profiles = scope.all
    end
  end

  def show
    @profile = Profile.find(params[:id])
    @message = Message.new
    @medialink = Medialink.new(url: "http://")
  end

  # action, view, routes should be deleted
  def new
    @profile = Profile.new
  end

# 	def create
# require 'pry' ; binding.pry
#     @profile = Profile.new(params[:profile])
#     if @profile.valid?
#       @profile.save!
#       sign_in @profile
#       redirect_to edit_profile_path(@profile)
#     else
#       flash.now.alert = @profile.errors.full_messages
#       render action: "new"
#     end
# 	end

  # should reuse the devise view
  def edit
    @profile = Profile.find(params[:id])<commit_msg>delete medialink from profile controller<commit_after>class ProfilesController < ApplicationController
  include ProfilesHelper

  before_filter :require_permision, :only=> [:edit, :destroy, :update]

  def index
    scope = Profile.is_published
    if params[:topic]
      @profiles = scope.tagged_with(params[:topic])
    else
      @profiles = scope.all
    end
  end

  def show
    @profile = Profile.find(params[:id])
    @message = Message.new
    # @medialink = Medialink.new(url: "http://")
  end

  # action, view, routes should be deleted
  def new
    @profile = Profile.new
  end

# 	def create
# require 'pry' ; binding.pry
#     @profile = Profile.new(params[:profile])
#     if @profile.valid?
#       @profile.save!
#       sign_in @profile
#       redirect_to edit_profile_path(@profile)
#     else
#       flash.now.alert = @profile.errors.full_messages
#       render action: "new"
#     end
# 	end

  # should reuse the devise view
  def edit
    @profile = Profile.find(params[:id])
{'fraction_non_alphanumeric': 0.11369378473976756, 'fraction_numerical': 0.0, 'mean_word_length': 3.024390243902439, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4905716', 'n_tokens_mistral': 640, 'n_tokens_neox': 622, 'n_words': 155}