From 677d92299b36a0eeaf8ec6aec211f5e6e325fe0d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 9 Jan 2005 17:14:47 +0000 Subject: Added conditional filters #431 [Marcel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/CHANGELOG') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 4467f352bb..f4ed8f3bac 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,17 @@ *SVN* +* Added conditional filters #431 [Marcel]. Example: + + class JournalController < ActionController::Base + # only require authentication if the current action is edit or delete + before_filter :authorize, :only_on => [ :edit, :delete ] + + private + def authorize + # redirect to login unless authenticated + end + end + * Added authentication framework to protect actions behind a condition and redirect on failure. See ActionController::Authentication for more. * Added Base#render_nothing as a cleaner way of doing render_text "" when you're not interested in returning anything but an empty response. -- cgit v1.2.3