Skip to content

Correction du lien vers un about (STI) dans le show d'un item de menu#746

Merged
SebouChu merged 1 commit intomainfrom
fix/menu-item-about
Jan 19, 2023
Merged

Correction du lien vers un about (STI) dans le show d'un item de menu#746
SebouChu merged 1 commit intomainfrom
fix/menu-item-about

Conversation

@SebouChu
Copy link
Copy Markdown
Member

@SebouChu SebouChu commented Jan 19, 2023

On utilise la méthode ActiveRecord::Base#becomes pour convertir les objets STI en leur parent. Les non-STI ne sont pas impactés car le base_class sera la même classe

Copy link
Copy Markdown
Member

@arnaudlevy arnaudlevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai pas compris mais ça a l'air malin

@SebouChu SebouChu merged commit 4ebb0ed into main Jan 19, 2023
@SebouChu SebouChu deleted the fix/menu-item-about branch January 19, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ActionView::Template::Error in admin/communication/websites/menus/items#show

2 participants