diff --git a/docs/3.0/fields/select.md b/docs/3.0/fields/select.md index f609a5d7..3b197479 100644 --- a/docs/3.0/fields/select.md +++ b/docs/3.0/fields/select.md @@ -36,8 +36,8 @@ class Project < ApplicationRecord enum type: { 'Large container': 'large', 'Medium container': 'medium', 'Tiny container': 'small' } end -# app/avo/resources/project_resource.rb -class ProjectResource < Avo::BaseResource +# app/avo/resources/project.rb +class Avo::Resources::Project < Avo::BaseResource field :type, as: :select, enum: ::Project.types, @@ -59,8 +59,8 @@ end You may want to display the values from the database and not the labels of the options. You may change that by setting `display_value` to `true`. ```ruby{5} -# app/avo/resources/project_resource.rb -class ProjectResource < Avo::BaseResource +# app/avo/resources/project.rb +class Avo::Resources::Project < Avo::BaseResource field :type, as: :select, display_with_value: true @@ -82,8 +82,8 @@ If it's set to `true` and you have a `placeholder` value assigned, it will use t If it's a string `include_blank: "No country"`, the `No country` string will appear as the first option in the `