5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 02:56:22 +00:00
panel/app/views/posts/_attributes_nested.haml

20 lines
549 B
Text
Raw Normal View History

2024-04-17 21:09:55 +00:00
-#
@param inverse [Symbol]
@param base [String]
@param locale [String]
@param post [Post]
@param site [Site]
@param dir [String]
- post.attributes.each do |attribute|
- next if attribute == :date
- next if attribute == :draft
- next if attribute == inverse
- metadata = post[attribute]
- type = metadata.type
- cache [metadata, I18n.locale] do
= render "posts/attributes/#{type}",
base: base, post: post, attribute: attribute,
metadata: metadata, site: site,
dir: dir, locale: locale, autofocus: false