Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few stylistic changes #317

Merged
merged 3 commits into from Jan 18, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/rack/session/abstract/id.rb
Expand Up @@ -36,7 +36,7 @@ def [](key)
private

def session_id_not_loaded?
!key?(:id) && !@session_id_loaded
!(@session_id_loaded || key?(:id))
end

def load_session_id!
Expand Down Expand Up @@ -183,15 +183,15 @@ class ID
:renew => false,
:sidbits => 128,
:cookie_only => true,
:secure_random => begin ::SecureRandom rescue false end
:secure_random => (::SecureRandom rescue false)
}

attr_reader :key, :default_options

def initialize(app, options={})
@app = app
@default_options = self.class::DEFAULT_OPTIONS.merge(options)
@key = options[:key] || "rack.session"
@key = @default_options.delete(:key)
@cookie_only = @default_options.delete(:cookie_only)
initialize_sid
end
Expand Down