Class: SiteBlog::TagsController

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

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /tags



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

def index
  render json: Tag.archived(false).as_json(except: [:archived])
end

#showObject

GET /tags/1



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

def show
  @tag = Tag.find(params[:id])
  render json: @tag.as_json(except: [:archived])
end