Cells v3.11.0 Release Notes
-
- ๐ Deprecated
Cell::Rails::ViewModel
, please inherit:class SongCell < Cell::ViewModel
. ViewModel#call
is now the prefered way to invoke the rendering flow. Without any argument,call
will runrender_state(:show)
. Pass in any method name you want.- โ Added
Caching::Notifications
. - โ Added
cell(:song, collection: [song1, song2])
to render collections. This only works with ViewModel (and, of course, Concept, too). - โ Added
::inherit_views
to only inherit views whereas real class inheritance would inherit all the dark past of the class. - ๐
::build_for
removed/privatized/changed. UseCell::Base::cell_for
instead. Base::_parent_prefixes
is no longer used, if you override that somewhere in your cells it will break. We have our own implementation for computing the controller's prefixes inCell::Base::Prefixes
(simpler).#expire_cell_state
doesn't take symbols anymore, only the real cell class name.- Remove
Cell::Base.setup_view_paths!
andCell::Base::DEFAULT_VIEW_PATHS
and the associated Railtie. I don't know why this code survived 3 major versions, if you wanna set you own view paths just useCell::Base.view_paths=
. - โ Add
Base::self_contained!
. - โ Add
Base::inherit_views
.
Concept
#concept
helper is mixed into all views as an alternative to#cell
and#render_cell
. Let us know if we should do that conditionally, only.- Concept cells look for layouts in their self-contained views directory.
- โ Add generator for Concept cells:
rails g concept Comment
- ๐ Deprecated