Sha256: 0cbe9f17994d717c9e42fac1e4d2c5653ce364e1ebdafa0a3fa63f91527f002e
Contents?: true
Size: 725 Bytes
Versions: 2
Compression:
Stored size: 725 Bytes
Contents
module Roboto class RobotsController < Roboto::ApplicationController def show render :text => 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
roboto-0.2.0 | app/controllers/roboto/robots_controller.rb |
roboto-0.1.0 | app/controllers/roboto/robots_controller.rb |