A
A
Alexander Korolev2016-01-19 17:43:39
Ruby on Rails
Alexander Korolev, 2016-01-19 17:43:39

How to combine rails engine with main application links?

Good afternoon.
I create a gem, I implemented an engine in it, which provides a couple of actions.
The problem is that the view from the engine is rendered with the layout from the main application, and all resource routes get the namespace from the engine.
Those. if with a regular action we render a search form on the page with controller: 'search', action: 'index', then when I try to display the engine page I get: controller: 'my_gem/search' - but I would like it to be as usual - search.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question