I''ve got caching mostly working but it''s acting string with
the index/home.
On the site I have a redirect the points http://nutritionreality.com at
http://nutritionreality.com/home
I do this in routes.rb by:
map.index '''', :controller => ''home'',
:action => ''index''
Caching happens on index (index.html gets created in public) but rails
won''t
create/cache home.html - which slows the site down. If I copy
public\index.html -> public\home.html I get the performance increase but
rails will never create home.html on it''s own. What am I missing?
Here is my home_controller.rb file. Initially it just had "def index"
but I
added "def home" while trying various solution.
class HomeController < ApplicationController
caches_page :index
caches_page :home
layout "ui"
def index
@siteoption = Siteoption.GetSiteOptionHash("Home")
@header_image = @siteoption["header_image"]
@header_text = @siteoption["header_text"]
@blogentry_pages, @blogentries = paginate :blogentry, :per_page => 10,
:order_by => ''created_on asc'', :conditions =>
"blog_id = 10"
render(:template => "/home/index")
end
def home
render(:action => :index)
end
end
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails