roidrage / redis-session-store

A simple session store for Rails based on Redis.
http://github.com/roidrage/redis-session-store
MIT License
366 stars 147 forks source link

Update readme for Ruby 3 #124

Closed cromega closed 2 years ago

cromega commented 3 years ago

Recent changes (Ruby 3) to keyword arguments causes this line to fail:

Rails.application.config.session_store :redis_session_store, {key: 'foo', redis: {}}

With a rather misleading error:

gems/railties-6.1.3.2/lib/rails/application/configuration.rb:304:in `session_store': wrong number of arguments (given 2, expected 0..1) (ArgumentError)

The correct syntax is:

Rails.application.config.session_store :redis_session_store, key: 'foo', redis: {}