From ff697316c85f9edc5a568d66f6c92ff6d13862cc Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 8 Jul 2014 10:23:05 +0200 Subject: rename warden extension to patch the original the Warden::SessionSerializer was not getting loaded at all because we had a file by the same name. We want it to get loaded and be patched instead. --- lib/extensions/warden.rb | 13 +++++++++++++ lib/warden/session_serializer.rb | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 lib/extensions/warden.rb delete mode 100644 lib/warden/session_serializer.rb (limited to 'lib') diff --git a/lib/extensions/warden.rb b/lib/extensions/warden.rb new file mode 100644 index 0000000..81d7076 --- /dev/null +++ b/lib/extensions/warden.rb @@ -0,0 +1,13 @@ +module Warden + # Setup Session Serialization + class SessionSerializer + def serialize(record) + [record.class.name, record.id] + end + + def deserialize(keys) + klass, id = keys + klass.constantize.find(id) + end + end +end diff --git a/lib/warden/session_serializer.rb b/lib/warden/session_serializer.rb deleted file mode 100644 index 81d7076..0000000 --- a/lib/warden/session_serializer.rb +++ /dev/null @@ -1,13 +0,0 @@ -module Warden - # Setup Session Serialization - class SessionSerializer - def serialize(record) - [record.class.name, record.id] - end - - def deserialize(keys) - klass, id = keys - klass.constantize.find(id) - end - end -end -- cgit v1.2.3