RubyRedGrapefruit
RubyRedGrapefruit

Reputation: 12214

What statement can I use in Rails 3 to render HTML from a small static file?

I have a file in:

RAILS_ROOT/public/system/pages

It is a snippet of HTML. I would like to render it, along with other things, in one of my views.

But it seems like when I try to do a render from a view, Rails is always looking for a partial. But it doesn't pick up the file even when I name it with a leading underscore. How can I read and display this HTML snippet within a view?

Upvotes: 1

Views: 1840

Answers (1)

Mauricio
Mauricio

Reputation: 5853

have you tried with

<%= render :file => 'your/path/', :layout => false %>

inside the erb?

Upvotes: 6

Related Questions