search for: publishcontroller

Displaying 2 results from an estimated 2 matches for "publishcontroller".

2006 Mar 02
8
User Authentication
...ot;Logging In" chapter of the Agile book. Ideally, any access to http://example.com/publish (and any of its subdirectories) should redirect to http:/example.com/publish/login when there is no valid session user_id. Code so far: -------------------------------------------- # controller class PublishController < ApplicationController before_filter :authenticate, :except => [:login, :login_user] def login if request.post? logged_in_user = @user.attempt_login if logged_in_user session[:user_id] = logged_in_user.id redirect_to(:action => ''index...
2007 Feb 14
4
cache sweeper not getting called
Hi, I''ve started to implement page caches but I''ve hit a brick wall getting a sweeper to clear the cache when needed. It seems that any models that I tell it to observe aren''t being observed properly. If I add the sweeper to a controller the initialize method runs, but no matter what I do the after_save/after_update callbacks aren''t running. Also if I try to