It is convenient to use the same identification attribute, say info, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.
Created 5 years ago by Mike – Tips – 2 comments – viewed 8,063 times
( +4 / -1 )
Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.