Class: RobotsController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Pundit::Authorization
Defined in:
app/controllers/robots_controller.rb

Overview

rubocop:disable Rails/ApplicationController

Instance Method Summary collapse

Instance Method Details

#index ⇒ Object



5
6
7
8
9
# File 'app/controllers/robots_controller.rb', line 5

def index
  respond_to do |format|
    format.text
  end
end

#sitemap ⇒ Object



11
12
13
14
15
16
17
18
# File 'app/controllers/robots_controller.rb', line 11

def sitemap
  @creators = CreatorPolicy::Scope.new(nil, Creator).resolve.local.filter(&:indexable?)
  @collections = CollectionPolicy::Scope.new(nil, Collection).resolve.local.filter(&:indexable?)
  @models = ModelPolicy::Scope.new(nil, Model).resolve.local.filter(&:indexable?)
  respond_to do |format|
    format.xml
  end
end