Make sure img exists and is allowed to be shown

This commit is contained in:
End 2026-03-20 10:32:58 -07:00
parent 758ece096a
commit bf63cb6374
No known key found for this signature in database

View file

@ -11,10 +11,11 @@ module Airtable
field :event, "Event"
field :owned_by, "owned_by"
field :allowed, "permission to show", type: :boolean
field :exists, "img exists", type: :boolean
field :event_url, "event_URL"
field :tags, "Tags"
scope :visible, -> { where(allowed: true) }
scope :visible, -> { where(allowed: true, exists: true) }
def as_json(options = nil)
user_id = options&.dig(:user_id)