File: replicants_controller.rb

package info (click to toggle)
ruby-voight-kampff 1.1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 340 kB
  • sloc: ruby: 240; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
class ReplicantsController < ActionController::Base
  def index
    header = "Replicants:\n===========\n"

    status, content = if request.bot?
      [200, '- Rick Deckard']
    else
      [403, 'No replicants here']
    end

    render plain: header + content, status: status
  end
end