You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an admin console that uses routes starting with 'admin'. All of the admin routes use controllers that inherit from Admin::ApplicationController. This controller has auth logic (ie. ensure_super_user).
Is it possible to configure dossier default route / controller to use a different namespace? In other words, is it possible to configure dossier's automatically created 'report' route so that it is 'admin/report' and those routes use a ReportController derived from Admin::ApplicationController instead?
I tried rolling my own, which more or less works eg:
#routes.rb
namespace :admin do
...
match 'reports/:action', :controller=>'reports', :as => :reports
class Admin::ReportsController < Admin::ApplicationController
But occasionally things don't work as expected. For instance, the options don't get passed automatically to the report. I fixed by passing params[:options] when I create the report, but it feels like I'm duplicating internal behavior. Is there a better way?
We have an admin console that uses routes starting with 'admin'. All of the admin routes use controllers that inherit from Admin::ApplicationController. This controller has auth logic (ie. ensure_super_user).
Is it possible to configure dossier default route / controller to use a different namespace? In other words, is it possible to configure dossier's automatically created 'report' route so that it is 'admin/report' and those routes use a ReportController derived from Admin::ApplicationController instead?
I tried rolling my own, which more or less works eg:
But occasionally things don't work as expected. For instance, the options don't get passed automatically to the report. I fixed by passing params[:options] when I create the report, but it feels like I'm duplicating internal behavior. Is there a better way?
The text was updated successfully, but these errors were encountered: