Created
November 13, 2010 11:16
-
-
Save MSch/675253 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ApplicationController < ActionController::Base | |
| def session | |
| @session_wrapper ||= SessionWrapper.new(request.session) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SessionWrapper < SimpleDelegator | |
| def initialize(session) | |
| super(session) | |
| @session = session | |
| end | |
| def mergable_users | |
| @session['mergable_users'] ||= Set.new | |
| end | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of always writing
I can now write
and it will work just fine.