Skip to content
Browse files

small refactor.

  • Loading branch information...
1 parent eec83b7 commit 6f836d7e641c83b57b6e885bfbb4efaafedb837f @lunks lunks committed Nov 19, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/main_controller.rb
View
5 app/main_controller.rb
@@ -8,8 +8,9 @@
end
get '/:name' do
- if params.size > 1 || params[:name] =~ /[A-Z]/
- redirect "/#{params[:name].downcase}"
+ correct_path = "/#{params[:name].downcase}"
+ if request.fullpath != correct_path
+ redirect correct_path
end
fotolog = Fotolog.new params[:name]
if retrieve_photos

0 comments on commit 6f836d7

Please sign in to comment.
Something went wrong with that request. Please try again.