Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is embedded ruby not working in a static page in public folder?

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

create.html.erb is placed in the public folder.

Everything loads fine but the embedded ruby doesn't 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 this as text instead of actually rendering. I tried doing an link and it worked fine.

like image 906
toandang Avatar asked Feb 21 '23 06:02

toandang


1 Answers

The public folder is for static content only-- no rendering engines will be run on these files.

like image 175
Carlos Ramirez III Avatar answered May 05 '23 13:05

Carlos Ramirez III