Sha256: f02a040ccc606f93576bcf5b83ac42ece82470d35de8ccc731e2117d43b61284
Contents?: true
Size: 915 Bytes
Versions: 4
Compression:
Stored size: 915 Bytes
Contents
-------------------------------- NAME -------------------------------- rails_current -------------------------------- DESCRIPTION -------------------------------- track 'current_user' et all in a tidy, global, and thread-safe fashion. -------------------------------- SYNOPSIS -------------------------------- most rails apps scatter a bunch of @current_foobar vars everywhere. don't do that. it's fugly. instead, do this. class ApplicationController Current(:user){ User.find session[:current_user } Current(:account) include Current end ... if current_user ... end self.current_account = Account.find(id) etc. out of the box it's loaded with Current.controller -------------------------------- INSTALL -------------------------------- gem install rails-current gem 'rails-current', :require => 'current' bundle install
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rails_current-1.3.0 | README.md |
rails_current-1.2.1 | README.md |
rails_current-1.2.0 | README.md |
rails_current-1.1.0 | README.md |