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

1.3k views Asked by At

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.

1

There are 1 answers

0
Carlos Ramirez III On BEST ANSWER

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