tag autocomplete and better browsing

This commit is contained in:
Kyle Drake 2014-07-31 15:25:08 -07:00
parent 581398f826
commit 1ac9cdf606
9 changed files with 1956 additions and 96 deletions

4
app.rb
View file

@ -266,6 +266,10 @@ post '/tags/remove' do
redirect request.referer
end
get '/tags/suggestions/:name.json' do |name|
Tag.suggestions(name).collect {|t| t.name}.to_json
end
get '/browse' do
@current_page = params[:current_page]
@current_page = @current_page.to_i