Gustavo Chaín
Gustavo Chaín

Reputation: 943

Render shared component from a Cell

I'm using Cell and they are great, but I have some components in app/views/shared/ that I would like to use inside a Cell.

Is that possible ?

Upvotes: 0

Views: 641

Answers (1)

Gustavo Chaín
Gustavo Chaín

Reputation: 943

It was described on docs : )

Sometimes you need to render a global partial from app/views within a cell. For instance, the gmaps4rails helper depends on a global partial. While this breaks encapsulation it’s still possible in cells - just add the global view path.

class MapCell < Cell::Rails
  append_view_path "app/views"

( taken from: https://github.com/apotonick/cells )

Upvotes: 3

Related Questions