Created
May 13, 2015 19:05
-
-
Save dogweather/409432164dace3b1815d to your computer and use it in GitHub Desktop.
businesses_controller#show
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show | |
map_query = CGI.escape("#{@business.name} #{@business.address} #{@business.city} #{STATE} #{@business.zipcode}") | |
@google_map_url = "https://www.google.com/maps/embed/v1/place?key=#{API_KEY}&q=#{map_query}" | |
@html_title = "#{@business.name} – health score #{@business.score}/100 – #{@business.city}, OR – Eaternet" | |
@html_description = "Health inspection history for the #{@business.name} at #{@business.address} in #{@business.city}, #{state}" | |
@inspection = @business.latest_inspection | |
@previous_inspections = @business.inspections.select { |i| i != @inspection } | |
@swiftype_meta_info = swiftype_metadata_json(@business) | |
expires_in(60.minutes, public: true) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment