Class: SiteBlog::TagsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SiteBlog::TagsController
- Defined in:
- app/controllers/site_blog/tags_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET /tags.
-
#show ⇒ Object
GET /tags/1.
Instance Method Details
#index ⇒ Object
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 |
#show ⇒ Object
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 |