In ActiveAdmin, when there are no items for the model (in my example User), it shows a default 'There are no Users yet. Create one'.
This is a MonkeyPatch:
Create a new file in lib folder and copy:
module ActiveAdmin
module Views
# Build a Blank Slate
class BlankSlate < ActiveAdmin::Component
builder_method :blank_slate
def default_class_name
'blank_slate_container'
end
def build(content)
super(span(content.html_safe, class: "blank_slate"))
end
end
end
end
Customize the content variable in build method to change the default message.
ActiveAdmin
settings. Look issues in
repository.html
or erb.html
in your resourcesIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With