Where to put partials shared by the whole application in Rails?
问题 Where would I go about placing partial files shared by more than one model? I have a page called crop.html.erb that is used for one model - Photo . Now I would like to use it for another model called User as well. I could copy and paste the code but that's not very DRY, so I figured I would move it into a partial. Since it's shared between two models - where would I place that partial ? Thanks! 回答1: The Rails convention is to put shared partials in /app/views/shared . 回答2: Update Layout