lib/ratchetio/rails/controller_methods.rb in ratchetio-0.3.1 vs lib/ratchetio/rails/controller_methods.rb in ratchetio-0.3.2

- old
+ new

@@ -8,10 +8,11 @@ :url => ratchetio_request_url, :user_ip => ratchetio_user_ip, :headers => ratchetio_request_headers, :GET => request.GET.to_hash, # leaving out POST for now + :session => ratchetio_session_data, :method => request.method, } end def ratchetio_person_data @@ -83,9 +84,17 @@ name = k.split("_", 2)[1].sub("_", "-").split(/(\W)/).map(&:capitalize).join headers[name] = v end end headers + end + + def ratchetio_session_data + if session.respond_to?(:to_hash) + session.to_hash + else + session.data + end end end end end