A
A
Anton2016-10-24 20:15:29
Ruby on Rails
Anton, 2016-10-24 20:15:29

How to split ActiveAdmin into two parts?

The first part is a complete admin panel for administrators. Now only she is.
The second part is a stripped down version for editors. Allow editors access only to those sections that are allowed, as well as give the ability to only create and edit.
Added to the ActiveAdmin config:

config.namespace :editor do |namespace|
  namespace.authorization_adapter = 'OnlyEditors'
end

And at /editor got this:
Unable to autoload constant Editor::DashboardController, expected /path/to/project/app/controllers/editor/dashboard_controller.rb to define it

OK. Not a problem - I created a directory, wrote this code in it:
module Editor
  class DashboardController
    # Пока пусто
  end
end

What got this:
undefined method `make_response!' for Editor::DashboardController:Class

In the end, I tried a bunch of combinations, tried to inherit something in the new controller (class) - nothing helps.
What am I doing wrong? What should be done? How to split the admin panel into 2 parts?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Andreev, 2016-10-24
@b0nn1e

activeadmin.info/docs/13-authorization-adapter.html

Z
zooks, 2016-12-14
@zooks

Wrapper around tables + overflow

A
Ankhena, 2016-12-15
@Ankhena

Show the color not in words, but in colored squares, show the word on hover/click.
Well, zeros can still be removed, but I think it will already be superfluous.
Remove grease.
ps It's still not clear why you have ALL header cells.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question