Fix tags search on browse

This commit is contained in:
Kyle Drake 2014-09-06 14:35:15 -07:00
parent 4441c12d09
commit 8a4e1765f0
2 changed files with 3 additions and 3 deletions

2
app.rb
View file

@ -309,7 +309,7 @@ get '/tags/suggestions/:name.json' do |name|
Tag.suggestions(name).collect {|t| t.name}.to_json
end
get '/browse' do
get '/browse/?' do
@current_page = params[:current_page]
@current_page = @current_page.to_i
@current_page = 1 if @current_page == 0

View file

@ -43,8 +43,8 @@
<div class="col col-50 filter">
<form method="GET" action="browse">
<fieldset class="grouping">
<label class="text-Label" for="tags">Search by tag:</label>
<input class="input-Area typeahead" name="tags" type="text" placeholder="pokemon" value="" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" dir="auto">
<label class="text-Label" for="tag">Search by tag:</label>
<input class="input-Area typeahead" name="tag" type="text" placeholder="pokemon" value="" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" dir="auto">
<input style="vertical-align: -5px;margin-left: 4px;" type="submit" class="btn-Action" value="Search">
</fieldset>
</form>