Skip to content

Using Perspectives in an Engine #2

@emerson-h

Description

@emerson-h

I'm working on an application that uses a component based approach, so we have several engines. I would love to keep the views as dumb as possible and Perspectives seems to be a great way to do that.

The project is setup something like this:

/var/www/
   /app
   /bin
   /components
      /foo_engine
         /app
            /assets
            /perspectives
               /bar
                  show.rb
            /mustaches
               /bar
                  show.mustache
            ...
        /bin
        ...
   /config
   ...

When visiting the engine's routes in the URL (e.g. foo_engine/bars/1/show), perspectives raises this error:

No such file or directory @ rb_sysopen - /var/www/app/mustaches/bar/show.mustache

It seems like it's not recognizing that it's running within an engine, so it's looking for mustaches in the top level app folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions