Rails 4:
enter the partial files that you intend to use through your application in /app/views/application
Then anywhere in the application you can easily:
render partial: 'partial_name', variable_name: variable
An added benefit is that you can always override the partial in a particular viewing space by overriding what that partial means in /app/views/controller_name/_partial_name.html.erb , and calls to the partial link will refer to a more specific context in which You are at. No, you get a partial application level.
Proposal taken from Thoughtbot
Charles Smith Sep 18 '14 at 16:17 2014-09-18 16:17
source share