# Avo > Documentation for Avo ## Pages - [Avo Documentation](avo-documentation.md) - [Avo for Ruby on Rails Documentation - Version 3.0](avo-for-ruby-on-rails-documentation-version-30.md): Generated from Avo documentation v3.0 for LLM consumption - [Getting Started](getting-started.md): Avo is a tool that helps developers and teams build apps 10x faster. It takes the things we always build for every ap... - [Avo 3](avo-3.md): Avo 3 is the version of Avo we always wanted to build. It condenses all the learnings we had for the past three years... - [Technical support](technical-support.md): Avo is designed to be a self-serve product with [comprehensive documentation](https://docs.avohq.io) and [demo apps](... - [run this command to get a new Rails app with Avo installed](run-this-command-to-get-a-new-rails-app-with-avo-installed.md): rails new -m APP_NAME - [run to install avo-pro](run-to-install-avo-pro.md): rails new -m APP_NAME - [run to install avo-advanced](run-to-install-avo-advanced.md): rails new -m APP_NAME - [Best practices](best-practices.md): Due of the dynamic nature of Ruby, Rails, and Avo, you might be tempted to do a few things differently than how we en... - [Scenario 1](scenario-1.md): def fields - [Scenario 2](scenario-2.md): def fields - [Example migration](example-migration.md): class AddIndexOnUsersCreatedAt < ActiveRecord::Migration[7.1] - [Getting Started](getting-started-2.md): Avo is a tool that helps developers and teams build apps 10x faster. It takes the things we always build for every ap... - [Avo ❤️ Rails & Hotwire](avo-rails-hotwire.md): In order to provide this all-in-one full-interface experience, we are using Rails' built-in [engines functionality](h... - [When referencing an Avo route, use avo](when-referencing-an-avo-route-use-avo.md): link_to 'Users', avo.resources_users_path - [When referencing a path for your app, use main_app](when-referencing-a-path-for-your-app-use-main-app.md): link_to "Contact", main_app.contact_path - [app/helpers/application_helper.rb](apphelpersapplication-helperrb.md): module ApplicationHelper - [app/controller/avo/products_controller.rb](appcontrolleravoproducts-controllerrb.md): class Avo::ProductsController < Avo::ResourcesController - [app/avo/resources/products_resource.rb](appavoresourcesproducts-resourcerb.md): class ProductsResource < Avo::BaseResource - [Installation](installation.md): - Ruby on Rails >= 6.1 - [config/application.rb](configapplicationrb.md): config.autoloader = :zeitwerk - [Add one of the following in your Gemfile depending on the tier you are on.](add-one-of-the-following-in-your-gemfile-depending-on-the-tier-you-are-on.md) - [Avo Pro](avo-pro.md): gem "avo", ">= 3.2.1" - [Avo Advanced](avo-advanced.md): gem "avo", ">= 3.2.1" - [Rakefile](rakefile.md): Rake::Task["assets:precompile"].enhance do - [Gem server authentication](gem-server-authentication.md): Avo comes in a few tiers. The Community tier which comes as a free gem available on rubygems.org and a few paid tiers... - [or](or.md): BUNDLE_PACKAGER__DEV=xxx bundle install - [Add one of the following in your Gemfile depending on the tier you are on.](add-one-of-the-following-in-your-gemfile-depending-on-the-tier-you-are-on-2.md) - [Avo Pro](avo-pro-2.md): gem "avo", ">= 3.2.1" - [Avo Advanced](avo-advanced-2.md): gem "avo", ">= 3.2.1" - [make it available in the docker image](make-it-available-in-the-docker-image.md): ENV BUNDLE_PACKAGER__DEV=$BUNDLE_PACKAGER__DEV - [Pass the key to the build argument](pass-the-key-to-the-build-argument.md): docker build --build-arg BUNDLE_PACKAGER__DEV=xxx - [Set the key as an environment variable on your machine](set-the-key-as-an-environment-variable-on-your-machine.md) - [Somewhere in your `.bashrc` or `.bash_profile` file](somewhere-in-your-bashrc-or-bash-profile-file.md): export BUNDLE_PACKAGER__DEV=xxx - [Then pass it to the build argument from there](then-pass-it-to-the-build-argument-from-there.md): docker build --build-arg BUNDLE_PACKAGER__DEV=$BUNDLE_PACKAGER__DEV - [Configure builder setup.](configure-builder-setup.md): builder: - [However you set your secrets in Kamal](however-you-set-your-secrets-in-kamal.md): BUNDLE_PACKAGER__DEV=xxx - [Install application gems](install-application-gems.md): COPY Gemfile Gemfile.lock ./ - [Gemfile](gemfile.md): gem 'avo' - [License troubleshooting](license-troubleshooting.md): There might be times when the configurations isn't up to date and you'd like to troubleshoot it. There are a couple o... - [config/initializers/avo.rb](configinitializersavorb.md): Avo.configure do |config| - [Authentication](authentication.md): With Avo, you have the flexibility to build apps either with or without authentication. While Avo has minimal assumpt... - [config/initializers/avo.rb](configinitializersavorb-2.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-3.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-4.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-5.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-6.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-7.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-8.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-9.md): Avo.configure do |config| - [config/avo.rb](configavorb.md): Avo.configure do |config| - [Authorization](authorization.md): When you share access to Avo with your clients or large teams, you may want to restrict access to a resource or a sub... - [Minimal authorization through OO design and pure Ruby classes](minimal-authorization-through-oo-design-and-pure-ruby-classes.md): gem "pundit" - [Example of enabling authorization client in Avo configuration](example-of-enabling-authorization-client-in-avo-configuration.md): config.authorization_client = :pundit - [config/initializers/avo.rb](configinitializersavorb-10.md): Avo.configure do |config| - [Since Version 3.10.0](since-version-3100.md): def attach_comments? - [The `parent` is the Post instance that the user is seeing. ex: Post.find(1)](the-parent-is-the-post-instance-that-the-user-is-seeing-ex-postfind1.md) - [The `query` is the Active Record query being done on the comments. ex: post.comments](the-query-is-the-active-record-query-being-done-on-the-comments-ex-postcomments.md): field :comments, as: :has_many, scope: -> { Pundit.policy_scope(parent, query) } - [Define ability to change the amount in Product Policy](define-ability-to-change-the-amount-in-product-policy.md): def amount? - [config/initializers/avo.rb](configinitializersavorb-11.md): Avo.configure do |config| - [app/avo/resources/photo_comment.rb](appavoresourcesphoto-commentrb.md): class Avo::Resources::PhotoComment < Avo::BaseResource - [config/initializers/avo.rb](configinitializersavorb-12.md): Avo.configure do |config| - [Pundit example](pundit-example.md): def authorize(user, record, action, policy_class: nil) - [Resource options](resource-options.md): Avo effortlessly empowers you to build an entire customer-facing interface for your Ruby on Rails application. One of... - [app/avo/resources/car.rb](appavoresourcescarrb.md): class Avo::Resources::Car < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb.md): class Avo::Resources::Post < Avo::BaseResource - [id :bigint not null, primary key](id-bigint-not-null-primary-key.md) - [status :integer default("draft")](status-integer-defaultdraft.md): class Post < ApplicationRecord - [app/models/user.rb](appmodelsuserrb.md): class User < ApplicationRecord - [app/avo/resources/user.rb](appavoresourcesuserrb.md): class Avo::Resources::User < Avo::BaseResource - [app/models/team.rb](appmodelsteamrb.md): class Team < ApplicationRecord - [app/avo/resources/team.rb](appavoresourcesteamrb.md): class Avo::Resources::Team < Avo::BaseResource - [app/avo/resources/team_user.rb](appavoresourcesteam-userrb.md): class Avo::Resources::TeamUser < Avo::BaseResource - [app/avo/resources/team.rb](appavoresourcesteamrb-2.md): class Avo::Resources::Team < Avo::BaseResource - [config/initializers/avo.rb](configinitializersavorb-13.md): Avo.configure do |config| - [app/controllers/avo/base_resources_controller.rb](appcontrollersavobase-resources-controllerrb.md): class Avo::BaseResourcesController < Avo::ResourcesController - [app/controllers/avo/posts_controller.rb](appcontrollersavoposts-controllerrb.md): class Avo::PostsController < Avo::BaseResourcesController - [config/initializers/avo.rb](configinitializersavorb-14.md): Avo.configure do |config| - [app/avo/base_resource.rb](appavobase-resourcerb.md): module Avo - [app/avo/resources/post_resource.rb](appavoresourcespost-resourcerb.md): module Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/comment.rb](appavoresourcescommentrb.md): class Avo::Resources::Comment < Avo::BaseResource - [app/models/comment.rb](appmodelscommentrb.md): class Comment < ApplicationRecord - [app/avo/resources/comment.rb](appavoresourcescommentrb-2.md): class Avo::Resources::Comment < Avo::BaseResource - [config/initializers/avo.rb](configinitializersavorb-15.md): Avo.configure do |config| - [Example migration](example-migration-2.md): class AddIndexOnUsersCreatedAt < ActiveRecord::Migration[7.1] - [app/avo/resources/task.rb](appavoresourcestaskrb.md): class Avo::Resources::Task < Avo::BaseResource - [As block:](as-block.md): self.pagination = -> do - [Or as hash:](or-as-hash.md): self.pagination = { - [Array Resources](array-resources.md): An **Array Resource** is a flexible resource that can be backed by an **array of hashes** or an **array of Active Rec... - [Fields](fields.md): import {useData} from 'vitepress' - [Fields](fields-2.md): Fields are the backbone of a`Resource`. - [Notice that even if those fields are hidden on the form, we still include them on `form_fields`.](notice-that-even-if-those-fields-are-hidden-on-the-form-we-still-include-them-on.md) - [This is because we want to be able to edit them using the tool.](this-is-because-we-want-to-be-able-to-edit-them-using-the-tool.md) - [When submitting the form, we need this fields declared on the resource in order to know how to process them and fill the record.](when-submitting-the-form-we-need-this-fields-declared-on-the-resource-in-order-t.md): def tool_fields - [Field options](field-options.md): Avo fields are dynamic and can be configured using field options. - [disabled will disable the field on the `Edit` view](disabled-will-disable-the-field-on-the-edit-view.md): field :name, as: :text, disabled: true - [options will set the dropdown options for a select field](options-will-set-the-dropdown-options-for-a-select-field.md): field :status, as: :select, options: %w[first second third] - [`resource.record` is nil when submitting the form on resource creation](resourcerecord-is-nil-when-submitting-the-form-on-resource-creation.md): field :name, as: :text, visible -> { resource.record.enabled? } - [Do this instead](do-this-instead.md): field :name, as: :text, visible -> { resource.record&.enabled? } - [using a value](using-a-value.md): field :name, as: :text, default: 'John' - [using a callback function](using-a-callback-function.md): field :level, as: :select, options: { 'Beginner': :beginner, 'Advanced': :advanced }, default: -> { Time.now.hour < 1... - [using the text value](using-the-text-value.md): field :custom_css, as: :code, theme: 'dracula', language: 'css', help: "This enables you to edit the user's custom st... - [using HTML value](using-html-value.md): field :password, as: :password, help: 'You may verify the password strength h... - [using default options](using-default-options.md): field :updated_status, as: :status, failed_when: [:closed, :rejected, :failed], loading_when: [:loading, :running, :w... - [using custom null values](using-custom-null-values.md): field :body, as: :textarea, nullable: true, null_values: ['0', '', 'null', 'nil', nil] - [for id field](for-id-field.md): field :id, as: :id, link_to_record: true - [for text field](for-text-field.md): field :name, as: :text, link_to_record: true - [for gravatar field](for-gravatar-field.md): field :email, as: :gravatar, link_to_record: true - [meta as a hash](meta-as-a-hash.md): field :status, - [meta as a block](meta-as-a-block.md): field :status, - [Field Discovery](field-discovery.md): `discover_columns`and`discover_associations`automatically detect and configure fields for your Avo resources based... - [app/avo/resources/user.rb](appavoresourcesuserrb-2.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-2.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-3.md): class Avo::Resources::Post < Avo::BaseResource - [config/initializers/avo.rb](configinitializersavorb-16.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-17.md): Avo.configure do |config| - [app/avo/resources/user.rb](appavoresourcesuserrb-3.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-4.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/project.rb](appavoresourcesprojectrb.md): class Avo::Resources::Project < Avo::BaseResource - [Resource controllers](resource-controllers.md): In order to benefit from Rails' amazing REST architecture, Avo generates a controller alongside every resource. - [Record previews](record-previews.md): :::warning - [Scopes](scopes.md): :::warning - [app/avo/scopes/admins.rb](appavoscopesadminsrb.md): class Avo::Scopes::Admins < Avo::Advanced::Scopes::BaseScope - [app/models/user.rb](appmodelsuserrb-2.md): class User < ApplicationRecord - [app/avo/resources/user.rb](appavoresourcesuserrb-4.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/user.rb](appavoresourcesuserrb-5.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/user.rb](appavoresourcesuserrb-6.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/user.rb](appavoresourcesuserrb-7.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/scopes/even_id.rb](appavoscopeseven-idrb.md): class Avo::Scopes::EvenId < Avo::Advanced::Scopes::BaseScope - [app/avo/scopes/even_id.rb](appavoscopeseven-idrb-2.md): class Avo::Scopes::EvenId < Avo::Advanced::Scopes::BaseScope - [app/avo/scopes/even_id.rb](appavoscopeseven-idrb-3.md): class Avo::Scopes::EvenId < Avo::Advanced::Scopes::BaseScope - [app/avo/scopes/even_id.rb](appavoscopeseven-idrb-4.md): class Avo::Scopes::EvenId < Avo::Advanced::Scopes::BaseScope - [app/avo/scopes/even_id.rb](appavoscopeseven-idrb-5.md): class Avo::Scopes::EvenId < Avo::Advanced::Scopes::BaseScope - [app/avo/scopes/even_id.rb](appavoscopeseven-idrb-6.md): class Avo::Scopes::EvenId < Avo::Advanced::Scopes::BaseScope - [app/avo/scopes/even_id.rb](appavoscopeseven-idrb-7.md): class Avo::Scopes::EvenId < Avo::Advanced::Scopes::BaseScope - [app/avo/scopes/even_id.rb](appavoscopeseven-idrb-8.md): class Avo::Scopes::EvenId < Avo::Advanced::Scopes::BaseScope - [Records ordering](records-ordering.md): A typical scenario is when you need to set your records into a specific order. Like re-ordering`Slide`s inside a`Ca... - [Discreet Information](discreet-information.md): Sometimes you need to have some information available on the record page, but not necesarily front-and-center. - [app/avo/resources/post.rb](appavoresourcespostrb-5.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-6.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-7.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-8.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-9.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-10.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-11.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-12.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/post.rb](appavoresourcespostrb-13.md): class Avo::Resources::Post < Avo::BaseResource - [Customizable controls](customizable-controls.md): One of the things that we wanted to support from day one is customizable controls on resource pages, and now, Avo sup... - [Or](or-2.md): actions_list exclude: [Avo::Actions::ExportSelection, Avo::Actions::PublishPost] - [Or](or-3.md): actions_list include: [Avo::Actions::ExportSelection, Avo::Actions::PublishPost] - [show controls](show-controls.md): back_button - [form (edit & new) controls](form-edit-new-controls.md): back_button - [index controls](index-controls.md): attach_button - [row controls](row-controls.md): order_controls - [Cover and Profile photos](cover-and-profile-photos.md): It's common to want to display the information in different ways than just "key" and "value". That's why Avo has rich... - [Array](array.md): The`Array`field in allows you to display and manage structured array data. This field supports flexibility in fetch... - [app/policies/course_policy.rb](apppoliciescourse-policyrb.md): class CoursePolicy < ApplicationPolicy - [Badge](badge.md): The`Badge`field is used to display an easily recognizable status of a record. - [Boolean](boolean.md): The`Boolean`field renders a`input[type="checkbox"]`on **Form** views and a nice green`check`icon/red`X`icon o... - [Boolean Group](boolean-group.md): The`BooleanGroup`is used to update a`Hash`with`string`keys and`boolean`values in the database. - [app/avo/resources/project.rb](appavoresourcesprojectrb-2.md): class Avo::Resources::Project < Avo::BaseResource - [Code](code.md): The`Code`field generates a code editor using [codemirror](https://codemirror.net/) package. This field is hidden on... - [Country](country.md): `Country`field generates a Select field on **Edit** view that includes all [ISO 3166-1](https://en.wikipe... - [All sorts of useful information about every country packaged as convenient little country objects.](all-sorts-of-useful-information-about-every-country-packaged-as-convenient-littl.md): gem "countries" - [Date](date.md): The`Date`field may be used to display date values. - [DateTime](datetime.md): The`DateTime`field is similar to the Date field with two new attributes.`time_24hr`tells flatpickr to use 24 hour... - [Or](or-4.md): field :start, as: :{{ $frontmatter.field_type }}, relative: true, timezone: -> { record.timezone } - [EasyMDE](easymde.md): :::info - [External image](external-image.md): You may have a field in the database that has the URL to an image, and you want to display that in Avo. That is where... - [File](file.md): :::warning - [Active Storage makes it simple to upload and reference files](active-storage-makes-it-simple-to-upload-and-reference-files.md): gem "activestorage" - [High-level image processing wrapper for libvips and ImageMagick/GraphicsMagick](high-level-image-processing-wrapper-for-libvips-and-imagemagickgraphicsmagick.md): gem "image_processing" - [Files](files.md): :::warning - [Active Storage makes it simple to upload and reference files](active-storage-makes-it-simple-to-upload-and-reference-files-2.md): gem "activestorage" - [High-level image processing wrapper for libvips and ImageMagick/GraphicsMagick](high-level-image-processing-wrapper-for-libvips-and-imagemagickgraphicsmagick-2.md): gem "image_processing" - [Gravatar](gravatar.md): The`Gravatar`field turns an email field from the database into an avatar image if it's found in the [Gravatar](http... - [Heading](heading.md): :::code-group - [Hidden](hidden.md): There are scenarios where in order to be able to submit a form, an input should be present but inaccessible to the us... - [With default](with-default.md): field :user_id, as: :hidden, default: -> { current_user.id } - [2. Remove the user_id field to prevent user_id it from overriding the user selection.](2-remove-the-user-id-field-to-prevent-user-id-it-from-overriding-the-user-select.md) - [Otherwise set the user_id to the current user and hide the field.](otherwise-set-the-user-id-to-the-current-user-and-hide-the-field.md): field :user, as: :belongs_to, visible: -> { context[:current_user].admin? } - [ID](id.md): The`id`field is used to show the record's id. By default, it's visible only on the`Index`and`Show`views. That i... - [KeyValue](keyvalue.md): The`KeyValue`field makes it easy to edit flat key-value pairs stored in`JSON`format in the database. - [Location](location.md): The`Location`field is used to display a point on a map. - [Markdown](markdown.md): :::info - [app/models/marksmith/renderer.rb](appmodelsmarksmithrendererrb.md): module Marksmith - [Money](money.md): The`Money`field is used to display a monetary value. - [Gemfile](gemfile-2.md): gem "avo-money_field" - [Number](number.md): The`number`field renders a`input[type="number"]`element. - [Password](password.md): The`Password`field renders a`input[type="password"]`element for that field. By default, it's visible only on the ... - [Preview](preview.md): The`Preview`field adds a tiny icon to each row on the view that, when hovered, it will display a preview ... - [Progress bar](progress-bar.md): The`ProgressBar`field renders a`progress`element on`Index`and`Show`views and and a`input[type=range]`elemen... - [Radio](radio.md): The`Radio`field is used to render radio buttons. It's useful when only one value can be selected in a given options... - [Record link](record-link.md): Sometimes you just need to link to a field. That's it! - [Gemfile](gemfile-3.md): gem "avo-record_link_field" - [Calling the method like so will give us an instance of a Post](calling-the-method-like-so-will-give-us-an-instance-of-a-post.md): Comment.first.post => # - [https://example.com/avo/resources/projects/40?via_record_id=40&via_resource_class=Avo%3A%3AResources%3A%3AProject](httpsexamplecomavoresourcesprojects40via-record-id40via-resource-classavo3a3ares.md): field :post, as: :record_link, add_via_params: true - [https://example.com/avo/resources/projects/40](httpsexamplecomavoresourcesprojects40.md): field :post, as: :record_link, add_via_params: false - [or](or-5.md): field :creator, as: :record_link, add_via_params: false do - [or](or-6.md): field :creator, as: :record_link, use_resource: "AdminUser", add_via_params: false do - [Rhino](rhino.md): The wonderful [Rhino Editor](https://rhino-editor.vercel.app/) built by [Konnor Rogers](https://www.konnorrogers.com/... - [Select](select.md): The`Select`field renders a`select`field. - [app/avo/resources/project.rb](appavoresourcesprojectrb-3.md): class Avo::Resources::Project < Avo::BaseResource - [app/models/project.rb](appmodelsprojectrb.md): class Project < ApplicationRecord - [app/avo/resources/project.rb](appavoresourcesprojectrb-4.md): class Avo::Resources::Project < Avo::BaseResource - [app/avo/resources/project.rb](appavoresourcesprojectrb-5.md): class Avo::Resources::Project < Avo::BaseResource - [app/avo/resources/project.rb](appavoresourcesprojectrb-6.md): class Avo::Resources::Project < Avo::BaseResource - [app/avo/resources/project.rb](appavoresourcesprojectrb-7.md): class Avo::Resources::Project < Avo::BaseResource - [Stars](stars.md): The`stars`field renders a star rating display on and views, and interactive clickable stars on <... - [Status](status.md): Displays the status of a record in three ways;`loading`,`failed`,`success`, or`neutral`. - [Tags field](tags-field.md): Adding a list of things to a record is something we need to do pretty frequently; that's why having the`tags`field ... - [app/avo/resources/course.rb](appavoresourcescourserb.md): class Avo::Resources::Course < Avo::BaseResource - [app/models/course.rb](appmodelscourserb.md): class Course < ApplicationRecord - [app/models/post.rb](appmodelspostrb.md): class Post < ApplicationRecord - [app/avo/resources/course.rb](appavoresourcescourserb-2.md): class Avo::Resources::Course < Avo::BaseResource - [db/migrate/add_skills_to_courses.rb](dbmigrateadd-skills-to-coursesrb.md): class AddSkillsToCourses < ActiveRecord::Migration[6.0] - [app/avo/resources/post.rb](appavoresourcespostrb-14.md): class Avo::Resources::Post < Avo::BaseResource - [app/models/post.rb](appmodelspostrb-2.md): class Post < ApplicationRecord - [app/avo/resources/post.rb](appavoresourcespostrb-15.md): class Avo::Resources::Post < Avo::BaseResource - [app/models/post.rb](appmodelspostrb-3.md): class Post < ApplicationRecord - [Text](text.md): The`Text`field renders a regular``element. - [Textarea](textarea.md): The`textarea`field renders a``element. - [Time](time.md): The`Time`field is similar to the DateTime field. It uses the time picker of flatpickr (without the calendar). - [Or](or-7.md): field :start, as: :{{ $frontmatter.field_type }}, relative: true, timezone: -> { record.timezone } - [Tip Tap](tip-tap.md): The`TipTap`field is deprecated in favor of the Rhino field. - [Trix](trix.md): field :body, as: :trix - [Active Storage makes it simple to upload and reference files](active-storage-makes-it-simple-to-upload-and-reference-files-3.md): gem "activestorage" - [High-level image processing wrapper for libvips and ImageMagick/GraphicsMagick](high-level-image-processing-wrapper-for-libvips-and-imagemagickgraphicsmagick-3.md): gem "image_processing" - [Associations](associations.md): One of the most amazing things about Ruby on Rails is how easy it is to create [Active Record associations](https://g... - [app/models/user.rb](appmodelsuserrb-3.md): class User < ApplicationRecord - [app/models/super_user.rb](appmodelssuper-userrb.md): class SuperUser < User - [User.all.map(&:class) => [User, SuperUser]](userallmapclass-user-superuser.md): For example, when you have two models,`User`and`SuperUser`with STI, when you call`User.all`, Rails will return a... - [app/avo/resources/super_user.rb](appavoresourcessuper-userrb.md): class Avo::Resources::SuperUser < Avo::BaseResource - [Belongs to](belongs-to.md): field :user, as: :belongs_to - [app/avo/resources/course_link.rb](appavoresourcescourse-linkrb.md): class Avo::Resources::CourseLink < Avo::BaseResource - [the string representation of the class](the-string-representation-of-the-class.md): "Avo::Resources::Post" - [app/avo/resources/post.rb](appavoresourcespostrb-16.md): class Avo::Resources::Post < Avo::BaseResource - [app/avo/resources/project.rb](appavoresourcesprojectrb-8.md): class Avo::Resources::Project < Avo::BaseResource - [app/models/user.rb](appmodelsuserrb-4.md): class User < ApplicationRecord - [app/avo/resources/post.rb](appavoresourcespostrb-17.md): class Avo::Resources::Post < Avo::BaseResource - [Has One](has-one.md): :::warning - [Has One](has-one-2.md): The`HasOne`association shows the unfolded view of your`has_one`association. It's like peaking on the`Show`view ... - [app/avo/resources/course_link.rb](appavoresourcescourse-linkrb-2.md): class Avo::Resources::CourseLink < Avo::BaseResource - [app/avo/resources/book.rb](appavoresourcesbookrb.md): class Avo::Resources::Book < Avo::BaseResource - [Has Many](has-many.md): By default, the`HasMany`field is visible only on the`Show`view. You will see a new panel with the model's associa... - [app/avo/resources/course_link.rb](appavoresourcescourse-linkrb-3.md): class Avo::Resources::CourseLink < Avo::BaseResource - [the string representation of the class](the-string-representation-of-the-class-2.md): "Avo::Resources::Post" - [app/avo/resources/book.rb](appavoresourcesbookrb-2.md): class Avo::Resources::Book < Avo::BaseResource - [app/models/comment.rb](appmodelscommentrb-2.md): class Comment < ApplicationRecord - [app/models/user.rb](appmodelsuserrb-5.md): class User < ApplicationRecord - [app/avo/resources/user.rb](appavoresourcesuserrb-8.md): class Avo::Resources::User < Avo::BaseResource - [Has And Belongs To Many](has-and-belongs-to-many.md): The`HasAndBelongsToMany`association works similarly to`HasMany`. - [app/avo/resources/course_link.rb](appavoresourcescourse-linkrb-4.md): class Avo::Resources::CourseLink < Avo::BaseResource - [the string representation of the class](the-string-representation-of-the-class-3.md): "Avo::Resources::Post" - [app/avo/resources/book.rb](appavoresourcesbookrb-3.md): class Avo::Resources::Book < Avo::BaseResource - [app/models/comment.rb](appmodelscommentrb-3.md): class Comment < ApplicationRecord - [app/models/user.rb](appmodelsuserrb-6.md): class User < ApplicationRecord - [app/avo/resources/user.rb](appavoresourcesuserrb-9.md): class Avo::Resources::User < Avo::BaseResource - [Resource panels](resource-panels.md): Panels are the backbone of Avo's display infrastructure. Most of the information that's on display is wrapped inside ... - [Several fields in a cluster](several-fields-in-a-cluster.md): :::info - [app/avo/resources/person.rb](appavoresourcespersonrb.md): class Avo::Resources::Person < Avo::BaseResource - [app/avo/resources/person.rb](appavoresourcespersonrb-2.md): class Avo::Resources::Person < Avo::BaseResource - [Resource Sidebar](resource-sidebar.md): By default, all declared fields are going to be stacked vertically in the main area. But there are some fields with i... - [Tabs](tabs.md): Once your Avo resources reach a certain level of complexity, you might feel the need to better organize the fields, a... - [Views](views.md): The Avo CRUD feature generates with four main views for each resource. - [Table View](table-view.md): The table view is the default way to display resources in Avo. It provides a powerful, tabular layout that supports s... - [config/initializers/avo.rb](configinitializersavorb-18.md): Avo.configure do |config| - [app/avo/resources/user.rb](appavoresourcesuserrb-10.md): class Avo::Resources::User < Avo::BaseResource - [Grid view](grid-view.md): Some resources are best displayed in a grid view. We can do that with Avo using a`cover_url`, a`title`, and a`body`. - [Map view](map-view.md): Some resources that contain geospatial data can benefit from being displayed on a map. For - [Customization options](customization-options.md): On the main navbar next to the logo, Avo generates a link to the homepage of your app. The label for the link is usua... - [config/initializers/avo.rb](configinitializersavorb-19.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-20.md): Avo.configure do |config| - [🚫 Don't add the scope to the root_path](dont-add-the-scope-to-the-root-path.md): Avo.configure do |config| - [✅ Do this instead](do-this-instead-2.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-21.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-22.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-23.md): Avo.configure do |config| - [Or](or-8.md): config.pagination = -> do - [config/initializers/avo.rb](configinitializersavorb-24.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-25.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-26.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-27.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-28.md): Avo.configure do |config| - [Eject](eject.md): If you want to change one of Avo's built-in views, you can eject it, update it and use it in your admin panel. - [Custom view types](custom-view-types.md): By default, Avo displays all the configured view types on the view switcher. For example, if you have`map_view`and ... - [Menu editor](menu-editor.md): One common task you need to do is organize your sidebar resources into menus. You can easily do that using the menu e... - [config/initializers/avo.rb](configinitializersavorb-29.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-30.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-31.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-32.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-33.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-34.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-35.md): Avo.configure do |config| - [Search](search.md): Finding what you're looking for fast is essential. That's why Avo leverages [ransack's](https://github.com/activereco... - [Gemfile](gemfile-4.md): gem 'ransack' - [config/initializers/avo.rb](configinitializersavorb-36.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-37.md): Avo.configure do |config| - [app/models/application.rb](appmodelsapplicationrb.md): class Application < ApplicationRecord - [app/models/client.rb](appmodelsclientrb.md): class Client < ApplicationRecord - [app/avo/resources/application.rb](appavoresourcesapplicationrb.md): class Avo::Resources::Application < Avo::BaseResource - [Localization (i18n)](localization-i18n.md): Avo leverages Rails' powerful`I18n`translations module. - [app/avo/resources/user.rb](appavoresourcesuserrb-11.md): class Avo::Resources::User < Avo::BaseResource - [avo.es.yml](avoesyml.md): es: - [app/avo/resources/project.rb](appavoresourcesprojectrb-9.md): class Avo::Resources::Project < Avo::BaseResource - [avo.es.yml](avoesyml-2.md): es: - [config/locales/avo.pt-BR.yml](configlocalesavopt-bryml.md): pt-BR: - [Branding](branding.md): Avo.configure do |config| - [Routing](routing.md): We stick to Rails defaults in terms of routing just to make working with Avo as straightforward as possible. - [config/routes.rb](configroutesrb.md): Rails.application.routes.draw do - [config/routes.rb](configroutesrb-2.md): Rails.application.routes.draw do - [routes.rb](routesrb.md): Rails.application.routes.draw do - [app/controllers/avo/switch_accounts_controller.rb](appcontrollersavoswitch-accounts-controllerrb.md): class Avo::SwitchAccountsController < Avo::ApplicationController - [Multitenancy](multitenancy.md): Multitenancy is a very talked-about subject. We're not going to go very deep into how to achieve it on the database l... - [config/routes.rb](configroutesrb-3.md): Rails.application.routes.draw do - [Actions Overview](actions-overview.md): Actions in Avo are powerful tools that transform the way you interact with your data. They enable you to perform oper... - [Action Generator](action-generator.md): Avo provides a powerful Rails generator to create action files quickly and efficiently. - [app/avo/actions/toggle_inactive.rb](appavoactionstoggle-inactiverb.md): class Avo::Actions::ToggleInactive < Avo::BaseAction - [app/avo/actions/export_users.rb](appavoactionsexport-usersrb.md): class Avo::Actions::ExportUsers < Avo::BaseAction - [Generate a regular action](generate-a-regular-action.md): bin/rails generate avo:action mark_as_featured - [Generate a standalone action](generate-a-standalone-action.md): bin/rails generate avo:action generate_monthly_report --standalone - [Generate an action in a namespace](generate-an-action-in-a-namespace.md): bin/rails generate avo:action admin/approve_user - [Registration](registration.md): Actions are registered within a resource by using the resource's`actions`method. This method defines which actions ... - [app/avo/resources/user.rb](appavoresourcesuserrb-12.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/user.rb](appavoresourcesuserrb-13.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/actions/toggle_inactive.rb](appavoactionstoggle-inactiverb-2.md): class Avo::Actions::ToggleInactive < Avo::BaseAction - [app/avo/resources/user.rb](appavoresourcesuserrb-14.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/user.rb](appavoresourcesuserrb-15.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/user.rb](appavoresourcesuserrb-16.md): class Avo::Resources::User < Avo::BaseResource - [Execution flow](execution-flow.md): When a user triggers an action in Avo, the following flow occurs: - [app/avo/actions/toggle_inactive.rb](appavoactionstoggle-inactiverb-3.md): class Avo::Actions::ToggleInactive < Avo::BaseAction - [Display notification for 5 seconds](display-notification-for-5-seconds.md): succeed 'Task completed successfully', timeout: 5000 - [Keep notification open indefinitely, until the user dismisses it](keep-notification-open-indefinitely-until-the-user-dismisses-it.md): warn 'Important warning - requires attention', timeout: :forever - [Use default timeout (falls back to global configuration)](use-default-timeout-falls-back-to-global-configuration.md): inform 'Action completed' - [app/avo/actions/toggle_inactive.rb](appavoactionstoggle-inactiverb-4.md): class Avo::Actions::ToggleInactive < Avo::BaseAction - [app/avo/actions/toggle_inactive.rb](appavoactionstoggle-inactiverb-5.md): class Avo::Actions::ToggleInactive < Avo::BaseAction - [app/avo/resources/project.rb](appavoresourcesprojectrb-10.md): class Avo::Resources::Project < Avo::BaseResource - [Customization](customization.md): Actions can be customized in several ways to enhance the user experience. You can modify the action's display name, c... - [app/avo/actions/release_fish.rb](appavoactionsrelease-fishrb.md): class Avo::Actions::ReleaseFish < Avo::BaseAction - [app/avo/actions/release_fish.rb](appavoactionsrelease-fishrb-2.md): class Avo::Actions::ReleaseFish < Avo::BaseAction - [app/avo/actions/release_fish.rb](appavoactionsrelease-fishrb-3.md): class Avo::Actions::ReleaseFish < Avo::BaseAction - [app/avo/actions/release_fish.rb](appavoactionsrelease-fishrb-4.md): class Avo::Actions::ReleaseFish < Avo::BaseAction - [app/avo/actions/release_fish.rb](appavoactionsrelease-fishrb-5.md): class Avo::Actions::ReleaseFish < Avo::BaseAction - [app/avo/actions/global_report.rb](appavoactionsglobal-reportrb.md): class Avo::Actions::GlobalReport < Avo::BaseAction - [app/avo/actions/global_report.rb](appavoactionsglobal-reportrb-2.md): class Avo::Actions::GlobalReport < Avo::BaseAction - [app/avo/actions/toggle_inactive.rb](appavoactionstoggle-inactiverb-6.md): class Avo::Actions::ToggleInactive < Avo::BaseAction - [app/avo/actions/toggle_inactive.rb](appavoactionstoggle-inactiverb-7.md): class Avo::Actions::ToggleInactive < Avo::BaseAction - [WIP](wip.md): this section is under construction - [app/avo/resources/city.rb](appavoresourcescityrb.md): class Avo::Resources::City < Avo::BaseResource - [Dashboards](dashboards.md): :::warning - [Create beautiful JavaScript charts with one line of Ruby](create-beautiful-javascript-charts-with-one-line-of-ruby.md): gem "chartkick" - [Cards](cards.md): Cards are one way of quickly adding custom content for your users. - [app/avo/cards/map_card.rb](appavocardsmap-cardrb.md): class Avo::Cards::MapCard < Avo::Cards::PartialCard - [Kanban boards](kanban-boards.md): :::warning - [config/initializers/avo.rb](configinitializersavorb-38.md): Avo.configure do |config| - [Collaboration](collaboration.md): Keep your team in sync with built-in comments and status updates. No more scattered communication across multiple tools. - [app/avo/resources/project.rb](appavoresourcesprojectrb-11.md): class Avo::Resources::Project < Avo::BaseResource - [app/avo/resources/project.rb](appavoresourcesprojectrb-12.md): class Avo::Resources::Project < Avo::BaseResource - [config/initializers/avo.rb](configinitializersavorb-39.md): Avo.configure do |config| - [Authorization](authorization-2.md): Control who can view, create, and manage collaboration timeline entries using Avo's authorization system. The collabo... - [app/policies/project_policy.rb](apppoliciesproject-policyrb.md): class ProjectPolicy < ApplicationPolicy - [app/policies/project_policy.rb](apppoliciesproject-policyrb-2.md): class ProjectPolicy < ApplicationPolicy - [app/policies/project_policy.rb](apppoliciesproject-policyrb-3.md): class ProjectPolicy < ApplicationPolicy - [Filters](filters.md): Most content management systems need a way to filter the data. - [Filters](filters-2.md): Filters allow you to better scope the index queries for records you are looking for. - [Example values payload](example-values-payload.md): { - [frozen_string_literal: true](frozen-string-literal-true.md): class Avo::Filters::CreatedAt < Avo::Filters::DateTimeFilter - [frozen_string_literal: true](frozen-string-literal-true-2.md): class Avo::Filters::StartingAt < Avo::Filters::DateTimeFilter - [app/models/course.rb](appmodelscourserb-2.md): class Course < ApplicationRecord - [app/avo/resources/course.rb](appavoresourcescourserb-3.md): class Avo::Resources::Course < Avo::BaseResource - [app/avo/filters/course_country.rb](appavofilterscourse-countryrb.md): class Avo::Filters::CourseCountry < Avo::Filters::BooleanFilter - [app/avo/filters/course_city.rb](appavofilterscourse-cityrb.md): class Avo::Filters::CourseCity < Avo::Filters::BooleanFilter - [app/avo/filters/course_city.rb](appavofilterscourse-cityrb-2.md): class Avo::Filters::CourseCity < Avo::Filters::BooleanFilter - [app/avo/filters/course_city.rb](appavofilterscourse-cityrb-3.md): class Avo::Filters::CourseCity < Avo::Filters::BooleanFilter - [in a view](in-a-view.md): decode_filter_params params[:filters] # {"NameFilter"=>"Apple"} - [Or somewhere in an Avo configuration file](or-somewhere-in-an-avo-configuration-file.md): class Avo::Actions::DummyAction < Avo::BaseAction - [in a view](in-a-view-2.md): filters = {"NameFilter"=>"Apple"} - [Or somewhere in an Avo configuration file](or-somewhere-in-an-avo-configuration-file-2.md): class Avo::Actions::DummyAction < Avo::BaseAction - [Dynamic filters](dynamic-filters.md): The Dynamic filters make it so easy to add multiple, composable, and dynamic filters to the view. - [Or authorize ALL attributes at once](or-authorize-all-attributes-at-once.md): class Project < ApplicationRecord - [However, the filter should apply the query to the population attribute.](however-the-filter-should-apply-the-query-to-the-population-attribute.md): dynamic_filter :custom_population, query_attributes: :population - [Using field's filterable option](using-fields-filterable-option.md): field :first_name, - [Using dynamic_filter method](using-dynamic-filter-method.md): dynamic_filter :first_name, - [Using field's filterable option](using-fields-filterable-option-2.md): field :first_name, - [Using dynamic_filter method](using-dynamic-filter-method-2.md): dynamic_filter :first_name, - [Using field's filterable option](using-fields-filterable-option-3.md): field :name, - [Using dynamic_filter method](using-dynamic-filter-method-3.md): dynamic_filter :name, - [Using field's filterable option](using-fields-filterable-option-4.md): field :user, - [Using dynamic_filter method](using-dynamic-filter-method-4.md): dynamic_filter label: "User (email & first_name)", - [Using field's filterable option](using-fields-filterable-option-5.md): field :first_name, - [Using dynamic_filter method](using-dynamic-filter-method-5.md): dynamic_filter :first_name, - [Using field's filterable option](using-fields-filterable-option-6.md): field :first_name, - [Using dynamic_filter method](using-dynamic-filter-method-6.md): dynamic_filter :first_name, - [Using field's filterable option](using-fields-filterable-option-7.md): field :tags, - [Using dynamic_filter method](using-dynamic-filter-method-7.md): dynamic_filter :tags, - [Using field's filterable option](using-fields-filterable-option-8.md): field :tags, - [Using dynamic_filter method](using-dynamic-filter-method-8.md): dynamic_filter :tags, - [app/avo/resources/post.rb](appavoresourcespostrb-18.md): class Avo::Resources::Post < Avo::BaseResource - [Custom pages (custom tools)](custom-pages-custom-tools.md): You may use custom tools to create custom sections or views to add to your app. - [app/helpers/home_helper.rb](apphelpershome-helperrb.md): module HomeHelper - [app/controllers/avo/tools_controller.rb](appcontrollersavotools-controllerrb.md): class Avo::ToolsController < Avo::ApplicationController - [app/views/avo/tools/dashboard.html.erb](appviewsavotoolsdashboardhtmlerb.md): Because you're in a Rails engine, you will have to prepend the engine object to the path. - [Custom fields](custom-fields.md): Avo ships with 20+ well polished and ready to be used, fields out of the box. - [app/avo/resources/project.rb](appavoresourcesprojectrb-13.md): class Avo::Resources::Project < Avo::BaseResource - [app/components/avo/fields/progress_bar_field/edit_component.html.erb](appcomponentsavofieldsprogress-bar-fieldedit-componenthtmlerb.md): class: helpers.input_classes('w-full', has_error: @field.model_errors.include?(@field.id)), - [app/components/avo/fields/progress_bar_field/index_component.html.erb](appcomponentsavofieldsprogress-bar-fieldindex-componenthtmlerb.md) - [app/components/avo/fields/progress_bar_field/show_component.html.erb](appcomponentsavofieldsprogress-bar-fieldshow-componenthtmlerb.md): You can customize them and add as much or as little content as needed. More on customization [below](#customize-the-v... - [app/avo/fields/super_text_field.rb](appavofieldssuper-text-fieldrb.md): module Avo - [lib/avo/fields/text_field.rb](libavofieldstext-fieldrb.md): module Avo - [app/avo/fields/progress_bar_field.rb](appavofieldsprogress-bar-fieldrb.md): class Avo::Fields::ProgressBarField < Avo::Fields::BaseField - [app/avo/fields/progress_bar_field.rb](appavofieldsprogress-bar-fieldrb-2.md): class Avo::Fields::ProgressBarField < Avo::Fields::BaseField - [app/avo/resources/project.rb](appavoresourcesprojectrb-14.md): class Avo::Resources::Project < Avo::BaseResource - [app/avo/fields/progress_bar_field.rb](appavofieldsprogress-bar-fieldrb-3.md): class Avo::Fields::ProgressBarField < Avo::Fields::BaseField - [app/components/avo/fields/progress_bar_field/show_component.html.erb](appcomponentsavofieldsprogress-bar-fieldshow-componenthtmlerb-2.md) - [app/components/avo/fields/progress_bar_field/index_component.html.erb](appcomponentsavofieldsprogress-bar-fieldindex-componenthtmlerb-2.md): For the`Edit`view, we're going to do something different. We'll implement a`range`input. - [app/components/avo/fields/progress_bar_field/edit_component.html.erb](appcomponentsavofieldsprogress-bar-fieldedit-componenthtmlerb-2.md): class: 'w-full', - [app/avo/fields/color_picker_field.rb](appavofieldscolor-picker-fieldrb.md): class Avo::Fields::ColorPickerField < Avo::Fields::BaseField - [app/components/avo/fields/color_picker_field/show_component.html.erb](appcomponentsavofieldscolor-picker-fieldshow-componenthtmlerb.md): class="h-6 px-1 rounded-md text-white text-sm flex items-center justify-center leading-none" - [Custom errors](custom-errors.md): Actions such as create, update, attach, etc... will not be completed if the record contains any errors. This ensures ... - [app/models/user.rb](appmodelsuserrb-7.md): class User < ApplicationRecord - [app/models/team_membership.rb](appmodelsteam-membershiprb.md): class TeamMembership < ApplicationRecord - [Resource tools](resource-tools.md): Similar to adding custom fields to a resource, you can add custom tools. A custom tool is a partial added to your res... - [app/avo/resources/post.rb](appavoresourcespostrb-19.md): class Avo::Resources::Post < Avo::BaseResource - [Stimulus JS & HTML attributes](stimulus-js-html-attributes.md): :::warning - [Wrappers get the `data-[CONTROLLER]-target="nameTextWrapper"` attribute and can be targeted using nameTextWrapperTarget](wrappers-get-the-data-controller-targetnametextwrapper-attribute-and-can-be-targ.md): field :name, as: :text - [Wrappers get the `data-[CONTROLLER]-target="createdAtDateTimeWrapper"` attribute and can be targeted using createdAtDateTimeWrapperTarget](wrappers-get-the-data-controller-targetcreatedatdatetimewrapper-attribute-and-ca.md): field :created_at, as: :date_time - [Wrappers get the `data-[CONTROLLER]-target="hasSkillsTagsWrapper"` attribute and can be targeted using hasSkillsTagsWrapperTarget](wrappers-get-the-data-controller-targethasskillstagswrapper-attribute-and-can-be.md): field :has_skills, as: :tags - [Inputs get the `data-[CONTROLLER]-target="nameTextInput"` attribute and can be targeted using nameTextInputTarget](inputs-get-the-data-controller-targetnametextinput-attribute-and-can-be-targeted.md): field :name, as: :text - [Inputs get the `data-[CONTROLLER]-target="createdAtDateTimeInput"` attribute and can be targeted using createdAtDateTimeInputTarget](inputs-get-the-data-controller-targetcreatedatdatetimeinput-attribute-and-can-be.md): field :created_at, as: :date_time - [Inputs get the `data-[CONTROLLER]-target="hasSkillsTagsInput"` attribute and can be targeted using hasSkillsTagsInputTarget](inputs-get-the-data-controller-targethasskillstagsinput-attribute-and-can-be-tar.md): field :has_skills, as: :tags - [app/avo/resources/course.rb](appavoresourcescourserb-4.md): class Avo::Resources::Course < Avo::BaseResource - [Custom asset pipeline](custom-asset-pipeline.md): Avo plays well with most Rails asset pipelines. - [app/views/avo/partials/_pre_head.html.erb](appviewsavopartials-pre-headhtmlerb.md): :::warning - [app/views/avo/partials/_pre_head.html.erb](appviewsavopartials-pre-headhtmlerb-2.md) - [TailwindCSS integration](tailwindcss-integration.md): We use TailwindCSS 3.0 with the JIT engine to style Avo, so on release we only pack the used Tailwind classes in our ... - [When running `rake assets:precompile` this is the order of events:](when-running-rake-assetsprecompile-this-is-the-order-of-events.md) - [4 - Task `assets:precompile`](4-task-assetsprecompile.md): Rake::Task["assets:precompile"].enhance(["avo:sym_link"]) - [Media Library](media-library.md): If you run an asset-intensive, having a place to view all those asses would be great. It's becoming easier with Avo a... - [config/initializers/avo.rb](configinitializersavorb-40.md): if defined?(Avo::MediaLibrary) - [config/initializers/avo.rb](configinitializersavorb-41.md): if defined?(Avo::MediaLibrary) - [config/initializers/avo.rb](configinitializersavorb-42.md): if defined?(Avo::MediaLibrary) - [config/initializers/avo.rb](configinitializersavorb-43.md): Avo.configure do |config| - [Cache](cache.md): Avo uses the application's cache system to enhance performance. The cache system is especially beneficial when dealin... - [config/initializers/avo.rb](configinitializersavorb-44.md): config.cache_store = -> { - [or](or-9.md): config.cache_store = ActiveSupport::Cache.lookup_store(:solid_cache_store) - [config/environments/production.rb](configenvironmentsproductionrb.md): config.cache_store = :solid_cache_store - [Views performance](views-performance.md): Sometimes, you may want to track the loading times and memory allocations of ViewComponents, similar to how you do wi... - [application.rb or development.rb](applicationrb-or-developmentrb.md): config.view_component.instrumentation_enabled = true - [config/initializers/view_component.rb](configinitializersview-componentrb.md): module ViewComponent - [`Avo::PanelComponent`](avopanelcomponent.md): The panel component is one of the most used components in Avo. - [Native field components](native-field-components.md): One of the most important features of Avo is the ability to extend it pass the DSL. It's very important to us to enab... - [In your resource file](in-your-resource-file.md): field :name, as: :text - [Field wrappers](field-wrappers.md): Each field display in your Avo resource has a field wrapper that helps display it in a cohesive way across the whole ... - [Index field wrapper](index-field-wrapper.md): Each field displayed on the view is wrapped in this component that regulates the way content is displayed a... - [Show & Edit field wrapper](show-edit-field-wrapper.md): The and field wrappers are actually the same component. - [Internals](internals.md): This section documents on how we think about the internals of Avo and hwo much you could/should hook into them to ext... - [Testing](testing.md): :::info - [`Avo::Current`](avocurrent.md): `Avo::Current`is based on the`Current`pattern Rails exposes using [`ActiveSupport/CurrentAttributes`](https://api.... - [Execution context](execution-context.md): Avo enables developers to hook into different points of the application lifecycle using blocks. - [Use it like so.](use-it-like-so.md): SOME_BLOCK = -> { - [products_helper.rb](products-helperrb.md): class ProductsHelper - [Execution context](execution-context-2.md): [`Avo::Services::EncryptionService`](https://github.com/avo-hq/avo/blob/main/lib/avo/services/encryption_service.rb) ... - ["x+rnETtClF2cb80PtYzlULnVB0vllf+FvwoqBpPbHWa8q6vlml5eRWrwFMcYrjI6--h2MiT1P5ctTUjwfQ--k2WsIRknFVE53QwXADDDJw=="](xrnettclf2cb80ptyzlulnvb0vllffvwoqbppbhwa8q6vlml5erwrwfmcyrji6-h2mit1p5cttujwfq-.md): Avo::Services::EncryptionService.decrypt(message: secret_encryption, purpose: :demo) - ["Secret string"](secret-string.md): secret_encryption = Avo::Services::EncryptionService.encrypt(message:Course::Link.first, purpose: :demo, serializer: ... - ["1UTtkhu9BDywzz8yl8/7cBZnOoM1wnILDJbT7gP+zz8M/t1Dve4QTFQP5nfHZdYK9KvFDwkizm8DTHyNZdixDtCO/M7yNMlzL8Mry1RQ3AF0qhhTzFeqb5UqyQv/Cuq+NWvQ+GXv3gFckXaNqsFSX5yDccEpRDpyNkYT4MFxOa+8hVR4roebkNKB89lb73anBDTHsTAd37y2LFiv2YaiFguPQ/...](1uttkhu9bdywzz8yl87cbznoom1wnildjbt7gpzz8mt1dve4qtfqp5nfhzdyk9kvfdwkizm8dthynzdi.md): Avo::Services::EncryptionService.decrypt(message: secret_encryption, purpose: :demo, serializer: Marshal) - [#](courselink0x00007fd28dc44c00-id-1-link-httportizcomcher-mohr-course-id-1-created.md): :::warning - [Select All](select-all.md): The "Select All" feature is designed to enable users to select all queried records and perform actions on the entire ... - [config/application.rb](configapplicationrb-2.md): config.active_record.marshalling_format_version = 7.1 - [Icons](icons.md): Avo provides a collection of SVG icons organized into two directories: [`avo`](https://github.com/avo-hq/avo/tree/mai... - [in a View Component](in-a-view-component.md): helpers.svg("avo/editor-strike") - [in a Rails helper](in-a-rails-helper.md): svg("heroicons/outline/magnifying-glass-circle", class: "block h-6 text-gray-600") - [Reserved model names and routes](reserved-model-names-and-routes.md): When defining models in an Avo-powered application, certain names should be avoided as they are used by Avo’s interna... - [`Avo::ApplicationController`](avoapplicationcontroller.md): You may sometimes want to add functionality to Avo's`ApplicationController`. That functionality may be setting attri... - [Copied from Avo to `app/controllers/avo/application_controller.rb`](copied-from-avo-to-appcontrollersavoapplication-controllerrb.md): module Avo - [app/controllers/concerns/multitenancy.rb](appcontrollersconcernsmultitenancyrb.md): module Multitenancy - [configuration/initializers/avo.rb](configurationinitializersavorb.md): Rails.configuration.to_prepare do - [app/controllers/concerns/application_controller_overrides.rb](appcontrollersconcernsapplication-controller-overridesrb.md): module ApplicationControllerOverrides - [configuration/initializers/avo.rb](configurationinitializersavorb-2.md): Rails.configuration.to_prepare do - [Asset manager](asset-manager.md): In your plugins or custom content you might want to add a new stylesheet or javascript file to be loaded inside Avo. - [Plugins](plugins.md): :::warning - [lib/avo/feed_view/engine.rb](libavofeed-viewenginerb.md): module Avo - [Guides](guides.md): These are various guides on how to build some things with Avo or how to integrate with different pieces of tech. - [Videos](videos.md): We regularly publish videos on our [YouTube channel](https://www.youtube.com/@avo_hq). - [Act as taggable on integration](act-as-taggable-on-integration.md): A popular way to implement the tags pattern is to use the [`acts-as-taggable-on`](https://github.com/mbleigh/acts-as-... - [Acts As Tenant Integration](acts-as-tenant-integration.md): Recipe [contributed](https://github.com/avo-hq/docs.avohq.io/pull/218) by [SahSantoshh](https://github.com/sahsantoshh). - [Migration](migration.md): class CreateAccounts < ActiveRecord::Migration[7.1] - [Account model handles Tenant management](account-model-handles-tenant-management.md): class Account < ApplicationRecord - [Authentication](authentication-2.md): class User < ActiveRecord::Base - [Multitenancy, to set the current account/tenant.](multitenancy-to-set-the-current-accounttenant.md): module Multitenancy - [Create default/first account where we want to associate exiting data](create-defaultfirst-account-where-we-want-to-associate-exiting-data.md): account = Account.find_or_create_by!(name: 'Nepal', subdomain: 'sahsantoshh') - [Add nested fields to CRUD forms](add-nested-fields-to-crud-forms.md): Please follow this guide to learn how to implement nested fields on Avo forms. - [Use Avo in an `api_only` Rails app](use-avo-in-an-api-only-rails-app.md): **After Avo version 2.9 👇** - [Require the gems listed in Gemfile, including any gems](require-the-gems-listed-in-gemfile-including-any-gems.md) - [you've limited to :test, :development, or :production.](youve-limited-to-test-development-or-production.md): Bundler.require(*Rails.groups) - [Attachment Policy Extension for Pundit](attachment-policy-extension-for-pundit.md): When using Pundit, it's common to define permissions for each attachment action (e.g., upload, delete, download) indi... - [Add Avo behind Basic Authentication](add-avo-behind-basic-authentication.md): Because in Rails we commonly do that using a static function on the controller we need to [safely extend the controll... - [app/controllers/concerns/basic_auth.rb](appcontrollersconcernsbasic-authrb.md): module BasicAuth - [config/initializers/avo.rb](configinitializersavorb-45.md): Avo.configure do |config| - [Add this to include it in Avo's ApplicationController](add-this-to-include-it-in-avos-applicationcontroller.md): Rails.configuration.to_prepare do - [Bulk destroy action using customizable controls](bulk-destroy-action-using-customizable-controls.md): In this guide, we'll explore how to implement a customizable bulk destroy action in Avo. This allows to delete multip... - [app/avo/actions/bulk_destroy.rb](appavoactionsbulk-destroyrb.md): class Avo::Actions::BulkDestroy < Avo::BaseActionAdd commentMore actions - [app/avo/base_resource.rb](appavobase-resourcerb-2.md): class Avo::BaseResource < Avo::Resources::Base - [Conditionally render styled rows](conditionally-render-styled-rows.md): We've had [a request](https://discord.com/channels/740892036978442260/1197693313520771113) come in from a customer to... - [How to Use Custom IDs with Avo](how-to-use-custom-ids-with-avo.md): Avo seamlessly integrates custom IDs, including popular solutions like FriendlyID, prefixed IDs, or Hashids. Below, y... - [app/models/post.rb](appmodelspostrb-4.md): class Post < ApplicationRecord - [app/models/post.rb](appmodelspostrb-5.md): class Post < ApplicationRecord - [app/models/post.rb](appmodelspostrb-6.md): class Post < ApplicationRecord - [Custom link field](custom-link-field.md): When you want to add a custom link as a field on your resource that points to a related resource (and you don't want ... - [with the format_using option](with-the-format-using-option.md): field :partner_home, as: :text, format_using: -> { link_to(value, value, target: "_blank") } do - [with the as_html option](with-the-as-html-option.md): field :partner_home, as: :text, as_html: true do - [Display and Edit Join Table Fields in `has_many :through` Associations](display-and-edit-join-table-fields-in-has-many-through-associations.md): A common scenario in Rails is using a`has_many :through`association to connect two models via a join model that con... - [Join Table](join-table.md): class StorePatron < ApplicationRecord - [app/avo/resources/user.rb](appavoresourcesuserrb-17.md): class Avo::Resources::User < Avo::BaseResource - [app/avo/resources/user.rb](appavoresourcesuserrb-18.md): class Avo::Resources::User < Avo::BaseResource - [We use different params to detect the navigation context:](we-use-different-params-to-detect-the-navigation-context.md) - [- `resource_name` identifies when users access through the index table](resource-name-identifies-when-users-access-through-the-index-table.md) - [- `via_resource_class` identifies when users click to view or edit the resource](via-resource-class-identifies-when-users-click-to-view-or-edit-the-resource.md): if params[:resource_name] == 'stores' || params[:via_resource_class] == 'Avo::Resources::Store' - [app/avo/resources/store.rb](appavoresourcesstorerb.md): class Avo::Resources::Store < Avo::BaseResource - [app/avo/resources/user.rb](appavoresourcesuserrb-19.md): class Avo::Resources::User < Avo::BaseResource - [Display scope record count](display-scope-record-count.md): The`name`and`description`scope options can be callable values and receive the`resource`,`scope`and`query`obj... - [Export to CSV action](export-to-csv-action.md): Even if we don't have a dedicated export to CSV feature, you may create an action that will take all the selected rec... - [app/avo/actions/export_csv.rb](appavoactionsexport-csvrb.md): class Avo::Actions::ExportCsv < Avo::BaseAction - [Pretty JSON objects to the code field](pretty-json-objects-to-the-code-field.md): It's common to have JSON objects stored in your database. So you might want to display them nicely on your resource p... - [Generating a custom component for a field](generating-a-custom-component-for-a-field.md): Each field in Avo has a component for each view that is responsible for rendering the field in that view. - [app/avo/base_resource.rb](appavobase-resourcerb-3.md): module Avo - [Handle 404 responses and redirections in Avo](handle-404-responses-and-redirections-in-avo.md): When Rails raises an`ActiveRecord::RecordNotFound`exception, by default, Avo will let Rails do its thing and send t... - [Hide field labels](hide-field-labels.md): One common use case for the`file`,`files`, and`external_image`fields is to display the logo for a record. You mig... - [How to Use [Phlex](https://www.phlex.fun/) Components in Avo](how-to-use-phlexhttpswwwphlexfun-components-in-avo.md): Avo uses [ViewComponent](https://viewcomponent.org/) to render fields, resources, and other parts of the UI. However,... - [app/components/phlex_component.rb](appcomponentsphlex-componentrb.md): class PhlexComponent < Phlex::HTML - [app/avo/resources/course_link.rb](appavoresourcescourse-linkrb-5.md): class Avo::Resources::CourseLink < Avo::BaseResource - [Manage information-heavy resources](manage-information-heavy-resources.md): This has been sent in by our friends at [Wyndy.com](https://wyndy.com). I'm just going to paste David's message becau... - [Multi-language URLs](multi-language-urls.md): Implementing multi-language URLs is a common use-case. Using a route scope block in Avo allows you to seamlessly adap... - [config/routes.rb](configroutesrb-4.md): Rails.application.routes.draw do - [app/controllers/avo/application_controller.rb](appcontrollersavoapplication-controllerrb.md): module Avo - [Multilingual content](multilingual-content.md): This is not an official feature yet, but until we add it with all the bells and whistles, you can use this guide to m... - [Temporary set the locale](temporary-set-the-locale.md): def set_force_locale - [config/initializers/avo.rb](configinitializersavorb-46.md): Avo.configure do |config| - [Use route-level multitenancy](use-route-level-multitenancy.md): :::tip - [app/models/current.rb](appmodelscurrentrb.md): class Current < ActiveSupport::CurrentAttributes - [Used for setting the Account by the first ID in the URL like Basecamp 3.](used-for-setting-the-account-by-the-first-id-in-the-url-like-basecamp-3.md) - [This means we don't have to include the Account ID in every URL helper.](this-means-we-dont-have-to-include-the-account-id-in-every-url-helper.md) - [From JumpstartRails AccountMiddleware](from-jumpstartrails-accountmiddleware.md): class AccountMiddleware - [config/routes.rb](configroutesrb-5.md): Rails.application.routes.draw do - [Move Avo custom tools routes to Avo engine](move-avo-custom-tools-routes-to-avo-engine.md): if defined? ::Avo - [app/controllers/avo/tools_controller.rb](appcontrollersavotools-controllerrb-2.md): class Avo::ToolsController < Avo::ApplicationController - [config/initializers/avo.rb](configinitializersavorb-47.md): Avo.configure do |config| - [Nested records when creating](nested-records-when-creating.md): A lot of you asked for the ability to create nested`has_many`records on the view. Although it's fairly "eas... - [Authentication using Rails' scaffold](authentication-using-rails-scaffold.md): In essence, the [authentication scaffold](https://github.com/rails/rails/pull/52328) that Rails 8 comes with is custo... - [config/initializers/avo.rb](configinitializersavorb-48.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-49.md): Avo.configure do |config| - [app/controllers/avo/application_controller.rb](appcontrollersavoapplication-controllerrb-2.md): module Avo - [REST API integration](rest-api-integration.md): Recipe [contributed](https://github.com/avo-hq/avo/issues/656) by [santhanakarthikeyan](https://github.com/santhanaka... - [Integration with rolify](integration-with-rolify.md): _Recipe contributed by [Paul](https://github.com/FLX-0x00) after discussing it [here](https://github.com/avo-hq/avo/i... - [Run Avo on the root path](run-avo-on-the-root-path.md): You might want to run avo on the root path on your app. - [How to safely override the resource views without maintaining core components](how-to-safely-override-the-resource-views-without-maintaining-core-components.md): Sometimes it's the small things in a UI that make a big impact. One of those things is being able to show a helpful m... - [app/components/avo/views/resource_custom_index_component.rb](appcomponentsavoviewsresource-custom-index-componentrb.md) - [frozen_string_literal: true](frozen-string-literal-true-3.md): class Avo::Views::ResourceCustomIndexComponent < Avo::Views::ResourceIndex - [test/components/avo/views/resource_custom_index_component_test.rb](testcomponentsavoviewsresource-custom-index-component-testrb.md) - [frozen_string_literal: true](frozen-string-literal-true-4.md): require "test_helper" - [app/avo/resources/movie.rb](appavoresourcesmovierb.md): class Avo::Resources::Movie < Avo::Resources::ArrayResource - [app/components/avo/views/resource_custom_index_component.rb](appcomponentsavoviewsresource-custom-index-componentrb-2.md) - [frozen_string_literal: true](frozen-string-literal-true-5.md): class Avo::Views::ResourceCustomIndexComponent < Avo::Views::ResourceIndex - [app/avo/base_resource.rb](appavobase-resourcerb-4.md): module Avo - [app/avo/resources/movie.rb](appavoresourcesmovierb-2.md): class Avo::Resources::Movie < Avo::Resources::ArrayResource - [app/components/avo/views/resource_custom_index_component.rb](appcomponentsavoviewsresource-custom-index-componentrb-3.md) - [frozen_string_literal: true](frozen-string-literal-true-6.md): class Avo::Views::ResourceCustomIndexComponent < Avo::Views::ResourceIndex - [app/avo/resources/movie.rb](appavoresourcesmovierb-3.md): class Avo::Resources::Movie < Avo::Resources::ArrayResource - [Display counter indicator on tabs switcher](display-counter-indicator-on-tabs-switcher.md): When a tab contains an association field you may want to show some counter indicator about how many records are on th... - [Use markdown for help attributes](use-markdown-for-help-attributes.md): :::info User contribution - [Use own helpers in Resource files](use-own-helpers-in-resource-files.md): Run`rails app:template LOCATION=' - [app/helpers/posts_helper.rb](apphelpersposts-helperrb.md): module PostsHelper - [config/initializers/avo.rb](configinitializersavorb-50.md): Avo.configure do |config| - [config/initializers/avo.rb](configinitializersavorb-51.md): Avo.configure do |config|