bl4d3
bl4d3

Reputation: 345

Load html.erb from different path

in my view I usually do something like this

<%= render :partial => "shared/p" %>

and _p.html.erb file is places into myapp/app/view/shared/_p.hrml.erb. Let's suppose I want to place this file in a cutomem folder like myapp/custom/_p.html.erb how can I load the folder custom into my app?

Upvotes: 0

Views: 337

Answers (1)

Ryan Bigg
Ryan Bigg

Reputation: 107728

Use append_view_path:

ActionController::Base.append_view_path("myapp/custom")

Upvotes: 3

Related Questions