<commit_before>module Spree
  class VenuesController < Spree::BaseController
    def index
      @stores = Spree::Store.all
    end

    def venues_near_by
      user_location = Spree::Venue.create(address: params[:zipcode])
      if !user_location.nil?
        @venues_near_by = Spree::Venue.by_distance_from_latlong(user_location.latitude, user_location.longitude)
      else
        # what to do if geocoder does not find an addres?
      end
      render "index"
    end
  end
end<commit_msg>change object in venues near by action<commit_after>module Spree
  class VenuesController < Spree::BaseController
    def index
      @stores = Spree::Store.all
    end
    # miles is a ghost field check result object.miles
    def venues_near_by
      user_location = Geocoder.coordinates(params[:zipcode])
      if !user_location.address.blank?
        @venues_near_by = Spree::Venue.by_distance_from_latlong(user_location.latitude, user_location.longitude)
        render "index"
      else
        # flash error
        # what to do if geocoder does not find an addres?
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07019143117593436, 'fraction_numerical': 0.0, 'mean_word_length': 3.021978021978022, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5989481', 'n_tokens_mistral': 347, 'n_tokens_neox': 338, 'n_words': 88}