Created by: gracewashere
Adapter templates live in lib/adapters/views
Pass request
into adapters to access URL helpers
Specifically, the
polymorphic_path
helper used by theBelongsToAdapter
needs to accessrequest.host
in order to look up the appropriate path. There will likely be other cases where views will need to access the controller'srequest
object.
Automatically look up templates for adapters
If you don't need any complicated logic to display an attribute, you can get away with just defining template files and a skeleton Adapter class