summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2016-05-03 12:26:37 -0600
committermo khan <mo@mokhan.ca>2016-05-03 12:26:37 -0600
commitc9b35df01922631815d79afb6bf496d40dfd932f (patch)
tree1888dae00b621447571fa97740750afdfa8b7c74 /app/helpers
parent882a106a9730778fa9bdf3e634097a674ced47e2 (diff)
allow adding new gyms by searching the yelp api.
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 05d4c44..3159bf1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -7,8 +7,12 @@ module ApplicationHelper
class: "gravatar"
end
- def search_form(search_path: @search_path || dashboard_path, remote: @remote_search)
- form_tag search_path, id: "search-form", method: :get, remote: remote do
+ def search_form(
+ id: 'search-form',
+ path: @search_path || dashboard_path,
+ remote: @remote_search
+ )
+ form_tag path, id: id, method: :get, remote: remote do
search_field_tag :q, params[:q], placeholder: t(:search)
end
end