Class: Elabs::TagsController

Inherits:
ElabsPublicController show all
Defined in:
app/controllers/elabs/tags_controller.rb

Constant Summary collapse

ALLOWED_ORDER_FROM =
%w[name].freeze
DEFAULT_ORDER =
{ name: :desc }.freeze

Constants inherited from ElabsPublicController

ElabsPublicController::ALLOWED_NESTED_FROM, ElabsPublicController::IS_NSFW_FILTERABLE, ElabsPublicController::MAX_ITEMS_PER_PAGE

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /tags GET /tags.json



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

def index
  @tags = scope_request Tag.all
end

#showObject

GET /tags/1 GET /tags/1.json



16
17
18
19
20
21
22
# File 'app/controllers/elabs/tags_controller.rb', line 16

def show
  @tag_albums = @tag.albums.for_relation
  @tag_articles = @tag.articles.for_relation
  @tag_notes = @tag.notes.for_relation
  @tag_projects = @tag.projects.for_relation
  @tag_uploads = @tag.uploads.for_relation
end