-
Now, have a look at what we have added. input_html_options is a parent class method, which returns HTML attributes for the input. builder - is an instance of the class ActiveAdmin::FormBuilder, inherited from ActionView::Helpers::FormBuilder. template is the context in which the templates are executed (basically, a huge set of view-helpers). Thus, if we need to create a piece of form, we'll call builder. While if we want to use something like link_to, template will help us.
-
Scout Monitoring
Performance metrics and, now, Logs Management Monitoring with Scout Monitoring. Get early access to Scout Monitoring's NEW Ruby logging feature [beta] by signing up now. Start for free and enable logs to get better insights into your Rails apps.
-
First of all, you should take a look at Active Admin's documentation regarding filters. You can continue your overview with the official README and wiki, where, among other things, you can find view-helpers to create custom search forms.
-
All Active Admin controllers are inherited from InheritedResources::Base, which means that we can modify their behavior using library methods. For example, here is how the list of available controller actions is defined:
-
In the example, Formtastic automatically extracts all attributes from the passed object and inserts them into a form with default input types. A list of available input types can be found in the README. Like Arbre, Formtastic can be extended by creating custom component classes. To understand the basics, we'll create a hello world component.
-
Say we have received a request from our blog editor: when writing a post, he would like to see the number of words directly in the input form. As you know, the world of JavaScript has libraries for everything, and there is one for our task too: Countable.js. Let's take the standard input for text (textarea) and extend it with a word counter.
-
Like all Arbre components, our Admin::Components::HelloWorld inherits from Arbre::Component class:
-
Formtastic is a pretty big library, and I would highly recommend reading the detailed README to get acquainted with all customization options. It will also be useful to see the already mentioned activeadmin_addons gem. There are lots of additional inputs in this library that are worth being checked out.
-
InfluxDB
Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.