Permalink
Browse files

remove ActiveSupport#present? stuff

Either this or we should require whatever 
file in active support that adds this method.
Or just declare a hard dependency on the whole library...
  • Loading branch information...
1 parent 9a605af commit b40f9acaff17f596695a058a870ede3af5660c21 @ajsharp ajsharp committed Jun 11, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/aarrr/session.rb
View
@@ -129,7 +129,7 @@ def parse_id(env_or_object)
# if it's a hash, then process like a request and pull out the cookie
if env_or_object.is_a?(Hash)
- if env_or_object["rack.session"].is_a?(Hash) and env_or_object["rack.session"]["user_id"].present?
+ if env_or_object["rack.session"].is_a?(Hash) and env_or_object["rack.session"]["user_id"]
# lookup user_id
user = AARRR.users.find_one({"user_id" => env_or_object["rack.session"]["user_id"].to_s})
if user.present?
@@ -166,7 +166,7 @@ def build_attributes(env_or_object)
user_attributes["ip_address"] = ip_address if ip_address
# set user_id if its in the session
- if env_or_object["rack.session"].is_a?(Hash) and env_or_object["rack.session"]["user_id"].present?
+ if env_or_object["rack.session"].is_a?(Hash) and env_or_object["rack.session"]["user_id"]
user_attributes["user_id"] = env_or_object["rack.session"]["user_id"].to_s
end

0 comments on commit b40f9ac

Please sign in to comment.