Permalink
Browse files

`titleize` also does too much: removes `_ids`

  • Loading branch information...
1 parent 50c3515 commit c37096b198beaa5581abe63d2a57ac40f7d3cc9c Nathan Long committed Jan 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/dossier/reports_controller.rb
@@ -27,7 +27,7 @@ def show
private
def report_class
- "#{params[:report].titleize.delete(' ')}Report".constantize
+ "#{params[:report].split('_').map(&:capitalize).join}Report".constantize
end
end

0 comments on commit c37096b

Please sign in to comment.