Class: SiteController
- Inherits:
-
CartoonistController
- Object
- ActionController::Base
- CartoonistController
- SiteController
- Defined in:
- app/controllers/site_controller.rb
Instance Method Summary collapse
Instance Method Details
#favicon ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/site_controller.rb', line 2 def favicon respond_to do |format| format.html { redirect_to "/" } format.ico do data = ActionController::Base.helpers.asset_paths.asset_environment[Cartoonist::Theme.favicon].to_s cache_page_as "static/favicon.ico" do send_data data, :filename => "favicon.ico", :type => "image/x-icon", :disposition => "inline" end end end end |
#robots ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/site_controller.rb', line 16 def robots respond_to do |format| format.html { redirect_to "/" } format.text do cache_page_as "static/robots.txt" do render :layout => false end end end end |
#sitemap ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'app/controllers/site_controller.rb', line 28 def sitemap respond_to do |format| format.html { redirect_to "/" } format.xml do @entries = load_sitemap_content render :content_type => "application/xml", :layout => "cartoonist" end end end |