Skip to content

Commit

Permalink
Merge pull request #120 from osjjames/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev authored Oct 16, 2023
2 parents f4a3998 + 798d0d7 commit 1aa0f63
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/3.0/avo-2-avo-3-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,33 @@ field :status,
```
:::

:::option `heading` has become a field type
Before, a heading used the `heading` method with a text string or HTML string as an argument.
Now, it is a field type with an ID. It supports rendering as text and as HTML.

### Actions to take

Rename `heading` to `field`. Give the field an ID and add the `as: :heading` argument.

```ruby
# Before
heading 'User Information'

# After
field :user_information, as: :heading
# or...
field :some_id, as: :heading, label: 'User Information'

# Before
heading '<div class="underline uppercase font-bold">User Information</div>', as_html: true

# After
field :some_id, as: :heading, as_html: true do
'<div class="underline uppercase font-bold">User Information</div>'
end
```
:::

:::option Moved some globals from `Avo::App` to `Avo::Current`

### Actions to take
Expand Down

0 comments on commit 1aa0f63

Please sign in to comment.