mirror of
https://github.com/System-End/stickers.git
synced 2026-04-19 22:05:10 +00:00
Make sure img exists and is allowed to be shown
This commit is contained in:
parent
758ece096a
commit
bf63cb6374
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue