
While FontAwesome provides aliases for all icons, we switch to the new names for consistency. See all changes at: https://fontawesome.com/docs/web/setup/upgrade/upgrade-from-v4#icons-renamed-since-version-4
7 lines
326 B
Plaintext
7 lines
326 B
Plaintext
- if policy(model).new?
|
|
// default value for fetch will always be evaluated even if it is not returned
|
|
- href_target = local_assigns.fetch(:path, false) || send(:"new_#{model.model_name.singular}_path")
|
|
a.btn.btn-success href=href_target
|
|
i.fa-solid.fa-plus
|
|
= t('shared.new_model', model: model.model_name.human)
|