<commit_before>class MenuController < ApplicationController

  layout 'menu'
  
  def index
    resto_name = request.subdomain.split(".").first
    restaurant = Restaurant.where(:subdomain => resto_name).first
    if !restaurant
      redirect_to "http://dishgo.io"
      return
    end
    @resto_data = restaurant.as_document
    @resto_data[:images] = restaurant.image.reject{|e| e.img_url_medium.blank?}.collect{|e| e.serializable_hash({})}
    @resto_data = @resto_data.as_json    
    @menu_data = "{ \"menu\" : #{restaurant.menu_to_json} }"
    render 'interactive'
  end

end<commit_msg>prolly shouldnt be pushing like this. oh well<commit_after>class MenuController < ApplicationController

  layout 'menu'
  
  def index
    resto_name = request.subdomain.split(".").first
    restaurant = Restaurant.where(:subdomain => resto_name).first
    if !restaurant
      redirect_to "http://dishgo.io"
      return
    end
    @resto_data = restaurant.as_document
    @resto_data[:images] = restaurant.image.reject{|e| e.img_url_medium.blank?}.collect{|e| e.serializable_hash({})}
    @resto_data = @resto_data.as_json    
    @menu_data = "{ \"menu\" : #{restaurant.menu_to_json} }".as_json
    render 'interactive'
  end

end
{'fraction_non_alphanumeric': 0.12845528455284552, 'fraction_numerical': 0.0, 'mean_word_length': 3.698473282442748, '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': '4132102', 'n_tokens_mistral': 419, 'n_tokens_neox': 406, 'n_words': 73}