- Defined in:
s provide a means of wrapping various framework methods in order to use outside of Rails and ActiveRecord.
There are currently two adapters available
A simple general purpose adapter which provides no support for transactions and only basic logging.
An adapter designed for use with Rails applications. Automatically wraps Base.create! in an active record transaction, and directs logging to the configure rails logger.
It is possible to create custom adapters to use with your own frameworks. It is suggested that you inherit fromto provide forward compatibility with future versions of RecordLoader.
Custom adapters should support three instance methods:
Wraps the Base.create! and allows you to handle transactional rollbacks in the event that something goes wrong. This method recieves a block and should be yielded to to generate the records.
Should return a logger object which impliments: debug, info, warn, error, fatal methods
Returns true if we are running in development mode.
Defined Under Namespace