<commit_before>class ExcursionsController < ApplicationController

  require 'fileutils'

  before_filter :authenticate_user!, :only => [ :new, :create, :edit, :update, :clone, :uploadTmpJSON, :upload_attachment ]
  before_filter :profile_subject!, :only => :index
  before_filter :fill_create_params, :only => [ :new, :create]
  skip_load_and_authorize_resource :only => [ :excursion_thumbnails, :metadata, :scormMetadata, :iframe_api, :preview, :clone, :manifest, :evaluate, :last_slide, :downloadTmpJSON, :uploadTmpJSON, :interactions, :upload_attachment, :show_attachment]
  skip_before_filter :store_location, :if => :format_full?
  skip_after_filter :discard_flash, :only => [:clone]
  after_filter :notify_teacher, :only => [:create, :update]

  # Enable CORS
  before_filter :cors_preflight_check, :only => [:excursion_thumbnails,:last_slide,:iframe_api]
  after_filter :cors_set_access_control_headers, :only => [:excursion_thumbnails,:last_slide,:iframe_api]
  
  include SocialStream::Controllers::Objects


  #############
  # REST methods
  #############

  def index
    redirect_to home_path
  end

  def show 
    show! do |format|<commit_msg>Do not store location on excursions attachments<commit_after>class ExcursionsController < ApplicationController

  require 'fileutils'

  before_filter :authenticate_user!, :only => [ :new, :create, :edit, :update, :clone, :uploadTmpJSON, :upload_attachment ]
  before_filter :profile_subject!, :only => :index
  before_filter :fill_create_params, :only => [ :new, :create]
  skip_load_and_authorize_resource :only => [ :excursion_thumbnails, :metadata, :scormMetadata, :iframe_api, :preview, :clone, :manifest, :evaluate, :last_slide, :downloadTmpJSON, :uploadTmpJSON, :interactions, :upload_attachment, :show_attachment]
  skip_before_filter :store_location, :only => [ :show_attachment ]
  skip_before_filter :store_location, :if => :format_full?
  skip_after_filter :discard_flash, :only => [:clone]
  after_filter :notify_teacher, :only => [:create, :update]

  # Enable CORS
  before_filter :cors_preflight_check, :only => [:excursion_thumbnails,:last_slide,:iframe_api]
  after_filter :cors_set_access_control_headers, :only => [:excursion_thumbnails,:last_slide,:iframe_api]
  
  include SocialStream::Controllers::Objects


  #############
  # REST methods
  #############

  def index
    redirect_to home_path
  end

  def show 
    show! do |format|
{'fraction_non_alphanumeric': 0.13553719008264462, 'fraction_numerical': 0.0, 'mean_word_length': 6.710191082802548, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3003186', 'n_tokens_mistral': 825, 'n_tokens_neox': 785, 'n_words': 163}