Class: Jobshop::Thing

Inherits:
ApplicationRecord show all
Defined in:
app/models/jobshop/thing.rb

Instance Method Summary collapse

Instance Method Details

#my_schemaObject



21
22
23
24
25
26
27
28
# File 'app/models/jobshop/thing.rb', line 21

def my_schema
  # TODO: Because shoulda-matchers doesn't properly recreate the test
  # subject this has the return {} when collection is nil. Collection will
  # only ever be nil during this test. Once the proper fk constraint is
  # added to the db, the test in question will raise an exception and a new
  # solution will need to be found.
  collection && collection.schema || {}
end