Skip to content

Commit

Permalink
Let the world know that these are deprecated now
Browse files Browse the repository at this point in the history
  • Loading branch information
pablobm committed Oct 15, 2020
1 parent 9b3bd4b commit 6161af9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/customizing_dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,9 @@ which are specified through the `.with_options` class method:
`:order` - Specifies the order of the dropdown menu, can be ordered by more
than one column. e.g.: `"name, email DESC"`.

`:primary_key` - Specifies object's primary_key. Defaults to `:id`.

`:foreign_key` - Specifies the name of the foreign key directly.
Defaults to `:#{attribute}_id`.

`:scope` - Specifies a custom scope inside a callable. Useful for preloading.
Example: `.with_options(scope: -> { MyModel.includes(:rel).limit(5) })`

`:class_name` - Specifies the name of the associated class.
Defaults to `:#{attribute}.to_s.singularize.camelcase`.

`:include_blank` - Specifies if the select element to be rendered should include
blank option. Default is `true`.

Expand All @@ -111,6 +103,14 @@ For example:
with this, you will be able to search through the column `name` from the
association `belongs_to :country`, from your model.

`:primary_key` (deprecated) - Specifies object's primary_key. Defaults to `:id`.

`:foreign_key` (deprecated) - Specifies the name of the foreign key directly.
Defaults to `:#{attribute}_id`.

`:class_name` (deprecated) - Specifies the name of the associated class.
Defaults to `:#{attribute}.to_s.singularize.camelcase`.

**Field::HasMany**

`:limit` - Set the number of resources to display in the show view. Default is
Expand All @@ -120,18 +120,15 @@ association `belongs_to :country`, from your model.

`:direction` - What direction the sort should be in, `:asc` (default) or `:desc`.

`:primary_key` - Specifies object's primary_key. Defaults to `:id`.
`:primary_key` (deprecated) - Specifies object's primary_key. Defaults to `:id`.

`:foreign_key` - Specifies the name of the foreign key directly. Defaults to `:#{attribute}_id`
`:foreign_key` (deprecated) - Specifies the name of the foreign key directly. Defaults to `:#{attribute}_id`

`:class_name` - Specifies the name of the associated class.
`:class_name` (deprecated) - Specifies the name of the associated class.
Defaults to `:#{attribute}.to_s.singularize.camelcase`.

**Field::HasOne**

`:class_name` - Specifies the name of the associated class.
Defaults to `:#{attribute}.to_s.singularize.camelcase`.

`:searchable` - Specify if the attribute should be considered when searching.
Default is `false`.

Expand All @@ -150,6 +147,9 @@ For example:
with this, you will be able to search through the column `name` from the
association `has_many :cities`, from your model.

`:class_name` (deprecated) - Specifies the name of the associated class.
Defaults to `:#{attribute}.to_s.singularize.camelcase`.

**Field::Number**

`:searchable` - Specify if the attribute should be considered when searching.
Expand Down

0 comments on commit 6161af9

Please sign in to comment.