<commit_before>class ApplicationController < ActionController::Base
  protect_from_forgery

  helper_method :last_two_posts, :random_quote
  
  def last_two_posts
    @last_two_posts ||= Post.published.limit(2)
  end
  
  def random_quote
    Quote.first(:order => "RANDOM()")
  end
end<commit_msg>helper with current controller and action<commit_after>class ApplicationController < ActionController::Base
  protect_from_forgery

  helper_method :last_two_posts, :random_quote, :whereami
  
  
  def last_two_posts
    @last_two_posts ||= Post.published.limit(2)
  end
  
  def random_quote
    Quote.first(:order => "RANDOM()")
  end
  
  def whereami
     params[:controller].to_s + "/" + params[:action]
     #     controller.controller_name.to_s + "/" + controller.action_name
  end
  
end
{'fraction_non_alphanumeric': 0.09709962168978563, 'fraction_numerical': 0.0025220680958385876, 'mean_word_length': 4.1558441558441555, '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': '1446444', 'n_tokens_mistral': 261, 'n_tokens_neox': 258, 'n_words': 48}