Sha256: 917ff7ebe819fd7b49956a96a8585f34db4304ce35f85f34fe06bafc791f16b6

Contents?: true

Size: 341 Bytes

Versions: 1

Compression:

Stored size: 341 Bytes

Contents

class LoginRequired
  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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fs_auth-0.0.1 app/filters/LoginRequired.rb