Commit 009f575

mo khan <mo@mokhan.ca>
2013-06-23 03:07:25
create tags controller
1 parent bd67959
Changed files (2)
app
config
app/controllers/tags_controller.rb
@@ -0,0 +1,6 @@
+class TagsController < ApplicationController
+  def show
+    @tag = params[:id]
+    @needs = Need.tagged_with(@tag)
+  end
+end
config/routes.rb
@@ -8,4 +8,5 @@ Yycrebuild::Application.routes.draw do
 
   resources :needs
   resources :neighbourhoods
+  resources :tags, :only => [:show], :path => :t
 end