CacheSweepers and url_for
Monday, December 31st, 2007 Posted in ActionController, ActionView, Rails, Ruby | No Comments »It appears url_for only seems to work correctly in a CacheSweeper when running a server in production mode. I've confirmed this in Rails 2.0.2. class MySeeper < ActionController::Caching::Sweeper observe Item def after_create(item) value = url_for(:controller => :items) end end In development mode, value evaluates ...
AJAX forms and file uploading in Rails
Thursday, September 20th, 2007 Posted in AJAX, ActionView | 3 Comments »One very nice thing about Ruby on Rails is the support for AJAX. I consider myself a backend guy, so I don’t generally like to touch Javascript (though I’ve written my fair share of XMLHttpRequest calls without the help of ...