-
Notifications
You must be signed in to change notification settings - Fork 5
View Models and Collections
TODO
The collection view_model renders each of the given items with its view_model.
Call collection_view_model_for: collection_view_model_instance = collection_view_model_for enumerable_containing_model_instances
Rendering a list: collection_view_model_instance.list
Rendering a collection: collection_view_model_instance.collection
Rendering a table: collection_view_model_instance.table
Rendering a pagination: collection_view_model_instance.pagination
Note: Only works if the passed parameter for collection_view_model_for
is a PaginationEnumeration
.
Important note:
As of yet it is needed to copy the templates/views/view_models/collection
directory to the corresponding location in app/views/view_models/collection.
This is only needed if you wish to use the collection view model.
The collections are automatically copied if you use the generator.
Note: Rewrite the collection templates as needed, they are rather basic.