similar to: caches_action :index for site root gets propagated to lower levels (how to stop?)

Displaying 20 results from an estimated 10000 matches similar to: "caches_action :index for site root gets propagated to lower levels (how to stop?)"

2008 Sep 24
3
caches_page :if not executing (but caches_action :if) does
Hi folks - Seeing a weird problem and would love some help. It''s documented in http://pastie.org/278310 to be more readable. In short, I have a caches_page "action", :if => {stuff} but the :if is never being called - the action is just caching every time. (If I put a debugger call in the :if block, it never stops.) If I replace caches_page with caches_action, the if
2006 Feb 13
3
caches_action does not go off the entire URL
I am trying to use caches_action and the agile book says that it is keyed off the URL, however it does not seem to pick up the URL parameters. http://localhost:3000/controller/action/id?foo=bar and http://localhost:3000/controller/action/id?foo=foobar Returns the same page. Anyone looked into how to add URL parameters to the cached key? Also, where do those file get stored? Thanks Dave
2006 Aug 23
0
Caches_action/ before_filter problem .
Hello, I have a method called "check_permission" that is set to run as a before_fitler and which checks if a user has the authorization to view a page. This page is displayed through the method "show" which is cached through the tag "caches_action :show" My problem is that once a user with authorization to a page accesses it, then afterwards all users (with or
2006 Mar 29
2
Fragment Cache Wackiness
I can''t seem to get the fragment cache to use :file_store. I''d really appreciate it if someone could point me in the right direction. Rails 1.1 final, FreeBSD Observe: In environment.rb AND production.rb (for good measure, DRY be damned): ActionController::Base.fragment_cache_store = :file_store, "/www/apps/localfeeds/directory/tmp/fragmentcache/" At the console
2005 Mar 24
3
Caching computation in rails?
Caching computation in rails? Simple example: factorial modulus a large number input: integer x output: factorial( x ) % 12345678901234567 I want it so that if it computes factorial of N once, it will not have to compute for N again. code: class SiteController < ApplicationController caches_action :factorial, :inv def examine @inv = @params[''inv''] @outv =
2007 Mar 26
2
Calling a controller action from script/console or runner
Is there a way to call or invoke a controller method from script/console or script/runner? The reason is that I''d like to pre-cache some of the actions on my controller. The pseudo code below is what I''d like to be able to do: class MyController < ApplicationController caches_action :test def test puts ''Hi there'' end end script/console:
2006 May 07
0
caches_action and render_component
I''ve made some test: ------------------ CODE ------------------ class FooController < ActionController::Base caches_action :foo def foo render_text ''Hello, foo<br />'' end end class BarController < ActionController::Base def bar render :inline => <<-EOS Hello, bar <br /> <%= render_component(:controller =>
2006 May 31
1
Using caches_action ?
Hi When I enable action caching in my controller with caches_action :view_thread only the first part of my layout template is rendered (up to the yield statement), and the development.log shows Processing ForumController#view_thread (for 127.0.0.1 at 2006-05-31 03:13:19) [GET] Session ID: d6f7ef15f479250fd7e31e252d70f5ff Parameters: {"action"=>"view_thread",
2012 May 11
14
What is the point of using :format in routes?
Today I had a strange behavior that made me suspect of jQuery at first, but then it happened that I''ve faced two gotchas, one from CoffeeScript and one from Rails itself. I have something like this: routes.rb post ''/fields/:id.:format'' => ''fields#show'', as: :field, constraints: {id: /\d+/} post ''/fields/remove/:id''
2006 Jan 19
1
Caching suggestions
Hi , I have created a simple app which allows user logins and when user logs in a home page is shown which is built using some queries to the DB. I tried caching which didnt work properly because for some reason rails kep loading the old cache..Anyway What I was wondering is caching only avoids the render process but IMHO the queries are the most consuming. My code is something like def index
2006 Jun 28
7
caching objects
Hi, i just wanted to say my sorries in advance (sorrie/sorry/sorri)...i have just started learning about the subject of caching, but unfortunately haven''t effictively managed to implement what i had learned. obviously it''s possible to cache a whole page, or action with the caches_page :x or caches_action :y methods, but for some reason it hasn''t really worked with
2006 May 18
2
tracking latency in rails
I''ve built a web-app and i want to start tracking request latencies so that i can see how the app handles more and more people using it. However, i''m not sure how this can be done. I''d like to be able to log the start-time when the request comes in and then log the end time as the response gets sent out. Do i need to bookend each action with a before-filter and
2006 Jan 08
9
URL/Site structure
Greetings, I''m fairly noob with rails and making my first DB driven site with it. I''m using the scaffold generator to develop the admin side of my site (admin_controller) I have three sections that I want to have the administrator edit, and I want to call these from the admin controller that has a layout with navigation to these three sections. When using the scaffold
2007 Feb 03
1
How can I bypass caching for some users
I have action caching setup for several actions of an application but I want the caching to only run for my administrators and have all other users see non-cached pages. Is there a way to do this? Perhaps something like passing a block to caches_action or setting some sort of flag in my authentication method? If this is not possible with action or fragment caching does anyone know of a
2005 Aug 17
4
Stop an action ?
Hi. I am working on a generic authentification system for rails (more complete than the login generator). The way it works is you call a method inside your action, passing the domain as a parameter (domains are like a group of users with specific rights). For that purpose, I need to exit the action inside this method because it redirects to a login page if that person isn''t
2007 Oct 28
0
caches_action - can I change the path?
How can I change: subdomain.domain.com/directory.file.cache to directory/file.cache I''d like to set how my action cache files are created. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2005 Dec 30
6
call a method once per page request
Hi, I''m wondering if there is a simple solution to call a method once per page request. I tried to place my call in a before_filter in ApplicationController but it''d called a second time if I use render_component from a view. Seems to me that a hook should be added in Dispatcher#prepare_application. Context: working on i18n, I''m trying to check lang either from uri,
2006 Jun 02
6
Set instance variable for all actions in the Controller
Can I set an application wide instance variable that is available for all actions...and their views? eg. class ApplicationController < ActionController::Base @current_user = User.find(session[:user_id]) end and everywhere I can call @current_user.id and I can get that object? Even down in the views? I could not get this to work... Thanks in advance, Jeff -------------- next part
2006 Jan 29
3
SHLG and lib dir
Slowly figuring out how to get my SaltedHashLoginGenerator stuff working. The wiki page says to put "before_filter :login_required" in the user (my "user" is "member") controller or in ApplicationController. However, wherever I put it I get NoMethodError. The rest of the SHLG stuff seems to be working... or at least I could get to the signup page, register, and
2006 Feb 23
5
Access to session from plugins
Hi! I am writing an acts_as_ plugin and i need to access session data from it. But i cant find any information if this is possible? And if it is, how. Cheers! Mathias