similar to: page caching

Displaying 20 results from an estimated 3000 matches similar to: "page caching"

2006 Mar 27
0
render_to_string troubles
Hi, I''m trying to build a simple mechanism for pre-caching a bunch of files by iterating over a hash of options from within a controller: #site.controller: for options in [ { :controller => "site", :action => "welcome" }, { :controller => "site", :action => "about" }, { :controller => "site", :action
2006 May 24
2
named routes confusion
Hi, I''m trying generate a URL from a named route like: namedroute_url(params...) but the generated route is always coming out as the first match from the routes table. The named route is defined inside a map.with_options block, but that shouldn''t matter should it? dorian -- -- I do things for love or money
2006 Jun 14
1
page caching with custom routes
hi , I''m having problems with expire_page with custom routes i''ll show some code blog_controller --------------- def clear_cache_rss_artikels expire_page url_for(:controller => "xml",:action => "rss_artikels") end this is called when a new article is posted or edited or destroyed xml_controller --------------- class XmlController <
2006 Apr 28
2
tests and login_engine
Hi there, I just started writing tests today after some months of using rails (slap wrists). I seem to be getting the hang of things, but I''m hitting a wall when it comes to functional_testing pages protected by login_engine/user_engine. all my assertions come back with: Expected response to be a <:success>, but was <302> Is there a way I can login from within a test?
2005 Nov 11
0
cache_page throwing "undefined method merge" error
rails (0.14.2), OSX, webrick (right now - lighttpd in production) I''m trying to cache pages with different file extensions and am having a heck of a time. This controller does nothing but display @cache.data (which can be XML or HTML) Here''s the controller: class DisplayController < ApplicationController caches_page :xml, :html session :off def xml @cache =
2006 Mar 09
0
Caching problem: expire_page not working
Hi all, I''m new to rails and I''ve run in to a rather insidious bug. In development (with caching turned on in development.rb), my app successfully caches action "index" in controller "view": class ViewController < ApplicationController caches_page :index def index # do the stuff that index does end end I''ve got a sweeper
2006 May 16
3
wondering how to do some clever DRYing up
Hi there, I''m now getting to the point in my rails app where I can use all of the nice basic features like AJAX and engines etc... but, I want to get my hands a bit dirtier, whilst learning to DRY up my code a bit. I''m using AJAX quite a bit to dynamically populate/edit/sort has_many relationships in forms, and consequently on a model with many has_many''s I end up
2006 Jan 23
2
require rmagick
Hello, I''m trying to use rmagick in a helper script (for auto-generating image sizes) and I''m not sure where I should be calling ''require''. currently I have: require ''RMagick'' at the top of my controller: class FilmsController < ApplicationController require ''RMagick'' but that''s giving me an error:
2006 Mar 29
1
load testing
hi, does anyone have any pointers for load testing an app running on apache2 with fastcgi? I have an app running circa 3000 page requests per day, most of which are static pre-cached files and fastcgi seems to be coping well so far (crosses fingers) but I would like to be able to work out my server limit. Currently I have the following in my apache conf: FastCgiServer
2006 May 09
1
name_url in tests
Hi there, I posted earlier asking about testing named routes in functional tests, but got no response, so I''m making my question less specific. It seems from the docs that it''s possible to to test named routes in cases such as: asserts_redirect_to name_url(:param => "whatever") but I haven''t seen any mention of it being used with any other tests and I keep
2006 Jun 07
1
railstidy
Hi there, anyone had any trouble with railstidy? I''m using it on 1.1.2 just to tidy my output and I get a server error everytime, but the only log message I get is: FastCGI: incomplete headers (0 bytes) received from server "/var/rails/dev/public/dispatch.fcgi" I have: after_filter :tidy def tidy RailsTidy.filter(response) end ...in my application.rb and I can get
2006 Jan 18
1
using unique varchar instead of id
Hi, I just signed up so ''hello everybody''. As the title suggests, I was wondering if there was an easy way to specify that I want all actions/controls to be based upon a particular parameter rather than :id (in this case :unique_name). I don''t :id to appear in URLs or elsewhere, I want it all to work from :unique_name. It seems like something that I should be able to
2006 Mar 24
10
innodb vs myisam
Hi, I have been using myisam tables in mysql with rails because my client will soon want fulltext searchable content, however when I migrated my development db from schema.rb all of the tables generated were innodb. I understand that I can override this, but also like the transactions and foreign keys of innodb. So 2 questions really: 1. are transactions in activerecord dependent on innodb or do
2007 Sep 10
2
expire_page not working
I''ve enabled page caching on a site I''m currently constructing. The sweeper is called upon any changes made to the model, as expected. The sweeper code is as follows: class PersonSweeper < ActionController::Caching::Sweeper observe Person def after_update(person) expire_staff_page end def after_destroy(person) expire_staff_page end def
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
2005 Mar 16
6
caches_page problem
I''m currently caches_page the show method in my Image controller. The show method looks at @params[''id''] to determine what output should be generated. The first time I access the method, say with http://localhost/public/image/show/1.jpg, the appropriate directories get created in /public (i.e. public/image/show/1.jpg). However, when I try to retrieve
2006 May 09
2
handling file upload onto local filesystem.
Hi, I have a multipart form upload field uploaded through <%= file_field("profile", "profile") %> Once a submit happens, the action basically does something like: profile = Profile.new(params["picture"]) This invokes the models = to method: def picture=(picture_field) ...do a bunch of assignments here end def validate ... do a bunch of validations
2006 Apr 25
3
limiting options in file_upload
Does anyone know if it''s possible to set constraints to the size & type of file that file_column will accept? I''d like to limit to image files of less than 2MB. If this isn''t possible with file_column, is there a graceful way of getting the controller to handle it? thanks dorian -- -- I do things for love or money
2006 Mar 02
2
url_for_file_column not returning correct path
I added this test towards the end of the included file_column_helper_test.rb that shipped with the file_column plugin: def test_url_for_file_column_different_root_path Entry.file_column :image, :root_path => File.join(RAILS_ROOT, "public/files") e = Entry.new(:image => upload(f("skanthak.png"))) assert_match %r{/public/files/entry/image},
2006 May 16
4
dealing with media file formats and RMagick.
Hello, I basically have the following problem - I have a site that will allow people to upload videos. The video may be in any format - .mov, .avi, .wmv etc.. I can either use embedded Windows Media Player, or embedded Quicktime to play the files but the problem is, how do I create stills from the movies to display them as .jpg''s on my site so when somebody clicks on them, the video