SpinaCMS / Spina

Spina CMS
http://www.spinacms.com
Other
2.18k stars 399 forks source link

has_content? doesn't actually check the content of a part #1333

Closed Bramjetten closed 5 months ago

Bramjetten commented 9 months ago

Currently the method for checking if a page has_content looks like this:

def has_content?(name)
  find_part(name).present?
end

This only checks if a part is present, not its content. Parts are pretty much always present if you've saved a page once, so this isn't all that useful. Perhaps a better implementation would be content(name).present?.

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bramjetten commented 7 months ago

Not stale

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.