<commit_before>class TermsController < ApplicationController
  layout :dynamic_layout

  def index
  end
  
  def principles
  end

  def accept_tc
    current_user.person.accept_tc!
    redirect_to next_policy_path
  end
  
  def accept_pp
    current_user.person.accept_pp!
    msg  = "has connected to sharedearth.net."
    link = "http://sharedearth.net"

    FbService.post_on_my_wall(current_user.token, msg, link, :append_name => true)
    redirect_to next_policy_path
  end
    
  def dynamic_layout
    if current_user.nil?  || !current_user.person.authorised_account
      'shared_earth'
    else
      'application'
    end
  end

end<commit_msg>Terms controller updated<commit_after>class TermsController < ApplicationController
  layout :dynamic_layout

  def index
  end
  
  def principles
  end

  def accept_tc
    current_user.person.accept_tc!
    redirect_to next_policy_path
  end
  
  def accept_pp
    current_user.person.accept_pp!
    if !params[:facebook].nil?
      msg  = "has connected to sharedearth.net."
      link = "http://sharedearth.net"

      FbService.post_on_my_wall(current_user.token, msg, link, :append_name => true)
    end
    redirect_to next_policy_path
  end
    
  def dynamic_layout
    if current_user.nil?  || !current_user.person.authorised_account
      'shared_earth'
    else
      'application'
    end
  end

end
{'fraction_non_alphanumeric': 0.06861313868613139, 'fraction_numerical': 0.0, 'mean_word_length': 3.1419939577039275, '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': '1347168', 'n_tokens_mistral': 453, 'n_tokens_neox': 442, 'n_words': 96}