1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00
fab-manager/app/views/api/events/index.json.jbuilder

11 lines
328 B
Plaintext
Raw Normal View History

2022-11-08 17:41:18 +01:00
# frozen_string_literal: true
2016-06-30 12:41:47 +02:00
total = @events.except(:offset, :limit, :order).count
json.array!(@events) do |event|
json.partial! 'api/events/event', event: event
2023-02-15 16:30:21 +01:00
json.event_image_small "#{event.event_image.attachment.small.url}?#{event.event_image.updated_at.to_i}" if event.event_image
2022-11-08 17:41:18 +01:00
json.nb_total_events total
2015-05-05 03:10:25 +02:00
end