[Boulder Ruby Group] rendering now!

ara.t.howard ara.t.howard at gmail.com
Fri Jun 29 01:07:52 EDT 2007


On Jun 28, 2007, at 11:00 PM, Bruce Williams wrote:

> I'd agree with Tony here, Ara.
>
> Authentication is generally handled as a filter (vs explicitly  
> calling it from an action) -- lots of bonuses with doing it this  
> way, since on a single line (before_filter :authenticate :only =>  
> [:foo, :bar]) you can get a bird's eye view of security within a  
> controller, and it looks/feels better [at least to me].
>

for the simple case i agree.  in fact this method was designed to be  
used in a filter.

> If you need to render a specific 'access denied' page, you should  
> be able to render and then return false from the filter, or do a  
> redirection.
>

which is exactly what i was doing...

more generally looking for a way to find a way to abstract bits of  
logic that might render and re-use them without resorting to testing  
return codes...


hope austin is treating you well!


-a
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/bdrg-members/attachments/20070628/c14550c8/attachment.html 


More information about the Bdrg-members mailing list