samsymons / RedditKit.rb

[Deprecated] A Ruby wrapper for the reddit API
https://redditkit.com/
MIT License
152 stars 26 forks source link

Using with Rails, tried to store RedditKit::Client in a session. "no _dump_data is defined for class Proc" #41

Open wahidrahim opened 9 years ago

wahidrahim commented 9 years ago

I am using RedditKit to make a Reddit app with limited capabilities, with rails. I am trying to figure out how to properly persist users session after logging in. My first idea was session[:client] = RedditKit::Client.new params[:username], params[:password], and I get no _dump_data is defined for class Proc error when I try to sign in.

I take it that RedditKit::Client cannot be marshalled? I have further suspicion that I shouldn't be storing the client in a session in the first place. Is there a recommended way?