trailblazer / cells

View components for Ruby and Rails.
https://trailblazer.to/2.1/docs/cells.html
3.07k stars 236 forks source link

Unable to access named routes in view #420

Closed ericgross closed 8 years ago

ericgross commented 8 years ago

I am rendering an HTML file from a cell in an application that mounts Spree as an engine. I want to access spree.new_spree_user_session_path but it is not defined in this context.

How can I access a mounted engine's named routes in my cell view?

apotonick commented 8 years ago

Pass the spree instance (whatever that is) into the cell.

cell(:comment, @comment, spree: spree)

and use it via options in the cell! :wink: