Skip to content

Commit

Permalink
Merge pull request #192 from kan/fix_json_url
Browse files Browse the repository at this point in the history
/statement/記事ID.json なURLがマッチしなくなっていたので修正
  • Loading branch information
tdtds committed Jul 16, 2015
2 parents 8ebe6c5 + f2f10d2 commit 0a59a01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class App < Sinatra::Base
end
end

before '/statement/:id*' do
before '/statement/:id.?:format?' do
case params[:id]
when 'photos' , 'photos.json'
when 'photos'
@query = {"photos" => {:$ne => [] } }
else
@statement = Statement.find_by_id(params[:id])
Expand Down

0 comments on commit 0a59a01

Please sign in to comment.