Class: TagsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/tags_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
13
# File 'app/controllers/tags_controller.rb', line 8

def index
  @tags = Tag.find(:all)
  respond_to do |format|
    format.html # index.html.erb
  end
end

#showObject



3
4
5
6
7
# File 'app/controllers/tags_controller.rb', line 3

def show
  @tag    = Tag.find(params[:id])
  @posts  = @tag.posts
  render '/posts/index'
end