Class: LoginRequired
- Inherits:
-
Object
- Object
- LoginRequired
- Defined in:
- app/filters/LoginRequired.rb
Class Method Summary collapse
Class Method Details
.filter(controller) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'app/filters/LoginRequired.rb', line 2 def self.filter(controller) unless controller.session[:user] controller.flash[:warning] = 'Please login to continue' controller.session[:return_to] = controller.request.fullpath controller.redirect_to :controller => "users", :action => "login" return false end return true end |