Why doesn't the embedded ruby ​​work on a static page in a shared folder?

I have a nav button that loads a new page (create.html.erb) through Lightbox 2.

create.html.erb is placed in a shared folder.

Everything loads fine, but the built-in ruby ​​does not work.

<div class="addButtons"> <div id="addPromotion"> Add a Promotion <div id="promotionInfo"> <%= render 'shared/promotion_form'%> </div> </div> <div id="createBoard"> Create a Board </div> </div> 

The page loads it as text instead of the actual rendering. I tried to make a link and it worked perfectly.

+4
source share
1 answer

The shared folder is intended only for static content - rendering mechanisms will not be launched in these files.

+8
source

Source: https://habr.com/ru/post/1399423/


All Articles