lib/global_session/session.rb in global_session-1.0.14 vs lib/global_session/session.rb in global_session-1.0.15
- old
+ new
@@ -78,9 +78,14 @@
else
create_invalid
end
end
+ # @return [true,false] true if this session was created in-process, false if it was initialized from a cookie
+ def new_record?
+ @cookie.nil?
+ end
+
# @return a Hash representation of the session with three subkeys: :metadata, :signed and :insecure
# @raise nothing -- does not raise; returns empty hash if there is a failure
def to_hash
hash = {}