Class: Monologue::TagsController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#all_tags, #archive_posts, #not_found, #recent_posts

Instance Method Details

#showObject



2
3
4
5
6
7
8
9
10
# File 'app/controllers/monologue/tags_controller.rb', line 2

def show
  @tag = retrieve_tag
  if @tag
    @page = nil
    @posts = @tag.posts_with_tag
  else
    redirect_to :root ,notice: "No post found with label \"#{params[:tag]}\""
  end
end