Reputation: 127
Is there a way to exclude admin based on Rails.env? I fixed the initializer,routes and gemfile, but it looks like its still trying to register the resources.
I want a setup where the production env does not have active admin, but another environment does and is pointing to the same database. I need to maintain both of these in the same git repo.
Appreciate any help I can get... Thanks
Stack: Rails 4, activeadmin
Upvotes: 1
Views: 230
Reputation: 648
One way to do this is to make the routes unavailable to the engine in different env.
in your config/routes.rb
file
add this
ActiveAdmin.routes(self) unless ENV['RAILS_ENV'] == 'production'
Upvotes: 0