Я пытаюсь сохранить значение в сеансе, используя приведенный ниже код в приложении rails
session[:key] = value
И я получаю ошибку ниже
TypeError (no _dump_data is defined for class Proc):
activesupport (3.2.9) lib/active_support/message_verifier.rb:53:in `dump'
activesupport (3.2.9) lib/active_support/message_verifier.rb:53:in `generate'
actionpack (3.2.9) lib/action_dispatch/middleware/cookies.rb:300:in `[]='
actionpack (3.2.9) lib/action_dispatch/middleware/session/cookie_store.rb:67:in `set_cookie'
rack (1.4.1) lib/rack/session/abstract/id.rb:330:in `commit_session'
rack (1.4.1) lib/rack/session/abstract/id.rb:206:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.9) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.9) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `
Любая помощь приветствуется.