Skip to content

Commit

Permalink
+ methods moved, + doc
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Aug 15, 2011
1 parent b6ae3a4 commit b0c0bf2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions generators/prototypes/all_in_one/sinatra/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,16 @@ class BookSearch < Sinatra::Application
haml :'/search'
end

# Configure. The configuration info page.
#
get '/configure' do
haml :'/configure'
end

# Renders the results into the json.
#
# You get the ids from the picky server and then
# populate the result with rendered models.
# You get the results from the (local) picky server and then
# populate the result hash with rendered models.
#
get '/search/full' do
results = books.search params[:query], params[:ids] || 20, params[:offset] || 0
Expand Down Expand Up @@ -97,12 +103,6 @@ class BookSearch < Sinatra::Application
results.to_json
end

# Configure. The configuration info page.
#
get '/configure' do
haml :'/configure'
end

helpers do

def js path
Expand Down
4 changes: 2 additions & 2 deletions generators/prototypes/client/sinatra/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

# Renders the results into the json.
#
# You get the ids from the picky server and then
# populate the result with rendered models.
# You get the results from the picky server and then
# populate the result hash with rendered models.
#
get '/search/full' do
results = BookSearch.search params[:query], :ids => params[:ids], :offset => params[:offset]
Expand Down

0 comments on commit b0c0bf2

Please sign in to comment.