Sha256: c7f732280d213836e43e335f7b2b230f7c7073f3f661350222344aa4d2ed506d
Contents?: true
Size: 440 Bytes
Versions: 2
Compression:
Stored size: 440 Bytes
Contents
module HumanPower module Rails class RobotsController < ::ApplicationController 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 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
human_power-0.1.0 | lib/human_power/rails/controller.rb |
human_power-0.0.6 | lib/human_power/rails/controller.rb |