Misleading claim on readme: administrate does have a DSL.
No DSLs (domain-specific languages)
A DSL is more than class methods invoked in class definitions.
Are we really declaring that the following is not a DSL:
ATTRIBUTE_TYPES = {
status: Field::Select.with_options(
searchable: false,
collection: %w[draft review approved] },
)
}
and the following would be a DSL?
attribute_type :status, Field::Select.with_options(
searchable: false,
collection: %w[draft review approved] },
)
What is so great about using constants vs class methods? That is still a set of predefined names that the user has to know and follow their expected value structure in order to work, so IMO there's absolutely no difference.
I believe that the greatest disadvantage of ActiveAdmin was that they went too far with the DSL: they created a DSL even for defining forms when you could just write a form erb file using the Rails helpers with not many more lines of code.
But to me, having to define things in a declarative way via constants with specific names in Administrate is not different at all from calling class methods on the class definition such as ActiveAdmin does for declaring basic things such as columns available for the index page.