one git repo to rule them all\!

This commit is contained in:
Senad Uka
2015-01-22 06:38:48 +01:00
parent c003584f7e
commit 23a6fda854
149 changed files with 967 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
get '/category' do
Category.order(:name).all.to_json(include: :sub_categories)
end
get '/category/:id' do
id = params[:id].to_i
Category.find(id).to_json(include: :sub_categories)
end