Sha256: 48898b34d5aa73ead016ca8d636577cddf96e9df58e5492042c0e105ddb06b00
Contents?: true
Size: 726 Bytes
Versions: 1
Compression:
Stored size: 726 Bytes
Contents
module Roboto class RobotsController < Roboto::ApplicationController def show render :plain => robot_contents, :layout => false, :content_type => 'text/plain' end protected def robot_contents # process erb template in the context of this controller request Roboto::ContentProvider.new.contents(binding) end def robots_path Rails.root.join("config/robots/#{Rails.env}.txt") end def default_robots [ Rails.root.join("config/robots/#{Rails.env}.txt"), Rails.root.join(default_path), Roboto::Engine.root.join(default_path) ].each do |path| return path if FileTest.exists?(path) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roboto-1.0.0 | app/controllers/roboto/robots_controller.rb |