Files
growstuff/app/resources/garden_resource.rb
T
Brenda Wallace 1135c763de Tidy API resources: read_only and owned macros, private hook helpers
Declare read-only resources and the owner relationship once each, make
the resource hook helpers private, simplify token auth, and cache the
generated API docs for an hour.
2026-10-25 11:48:28 +13:00

16 lines
314 B
Ruby

# frozen_string_literal: true
class GardenResource < ApplicationResource
self.model = Garden
attribute :name, :string
filter_only :slug, :string
filter_only :active, :boolean
filter_only :location, :string
filter_only :garden_type_id, :integer
owned
has_many :plantings
photos_of 'Garden'
end