Skip to content

Commit

Permalink
Fix API key logic. [#82]
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed Aug 2, 2013
1 parent 6d3ac25 commit 613b10c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/events_helper.rb
Expand Up @@ -150,7 +150,7 @@ def status_strings
private

def google_maps_header(hostname)
api_key = GMAPS_API_KEY.respond_to?(:[]) ? GMAPS_API_KEY[hostname] : GMAPS_API_KEY
api_key = GMAPS_API_KEY.kind_of?(Array) ? GMAPS_API_KEY[hostname] : GMAPS_API_KEY
javascript_include_tag "http://maps.google.com/maps?file=api&v=2&sensor=false&key=#{api_key}"
end
end
2 changes: 1 addition & 1 deletion spec/helpers/events_helper_spec.rb
Expand Up @@ -124,7 +124,7 @@
end

helper.content_for(:javascript).should_not be_nil
api_key = GMAPS_API_KEY.respond_to?(:[]) ? GMAPS_API_KEY[DOMAIN] : GMAPS_API_KEY
api_key = GMAPS_API_KEY.kind_of?(Array) ? GMAPS_API_KEY[DOMAIN] : GMAPS_API_KEY
helper.content_for(:javascript).should include(javascript_include_tag "http://maps.google.com/maps?file=api&v=2&sensor=false&key=#{api_key}")
helper.content_for(:javascript).should include(javascript_include_tag 'events/map')
end
Expand Down

0 comments on commit 613b10c

Please sign in to comment.