lib/nice_partials/partial.rb in nice_partials-0.9.2 vs lib/nice_partials/partial.rb in nice_partials-0.9.3
- old
+ new
@@ -68,10 +68,10 @@
def section(name, content = nil, **options, &block)
section_from(name).then { _1.write?(content, **options, &block) ? nil : _1 }
end
def section?(name)
- @sections&.dig(name).present?
+ section_from(name).present?
end
alias content_for? section?
def content_for(...)
section(...).presence&.to_s