Commit 58f08fce

mo khan <mo@mokhan.ca>
2013-06-18 03:28:12
replace ' ' with '-' when looking up a tag
1 parent 7d834e6
Changed files (1)
app
app/controllers/tags_controller.rb
@@ -1,6 +1,6 @@
 class TagsController < ApplicationController
   def show
-    @tag = params[:id]
+    @tag = params[:id].gsub(/ /, '-')
     @total_tutorials = Tutorial.tagged_with(@tag).count
     @total_creations = Creation.tagged_with(@tag).count
     @creations = Creation.includes(:user).tagged_with([@tag]).page(params[:page]).per(15)