Class: HumanPower::Rails::RobotsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/human_power/rails/controller.rb

Instance Method Summary collapse

Instance Method Details

#robotsObject



4
5
6
7
8
9
10
11
12
# File 'lib/human_power/rails/controller.rb', line 4

def robots
  generator = HumanPower::Generator.new(self) do
    file = ::Rails.root.join("config", "robots.rb").to_s
    instance_eval open(file).read, file
  end

  # render text: something does not give correct content type
  render text: generator.render, content_type: Mime::TEXT
end