Skip to content

Commit

Permalink
fixes issue #2919
Browse files Browse the repository at this point in the history
Add missing cookie middleware when rails is used in api mode
  • Loading branch information
rbbydotdev committed Mar 25, 2018
1 parent c903d2e commit 5b55c75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/rails_admin/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class Engine < Rails::Engine
initializer 'RailsAdmin setup middlewares' do |app|
app.config.middleware.use ActionDispatch::Flash
app.config.middleware.use Rack::Pjax

app.config.session_store :cookie_store
app.config.middleware.use ActionDispatch::Cookies
app.config.middleware.use ActionDispatch::Session::CookieStore, app.config.session_options
app.config.middleware.use Rack::MethodOverride
end

rake_tasks do
Expand Down

0 comments on commit 5b55c75

Please sign in to comment.