Drying up partials

over the last several weeks i’ve really started trying to put partials
to work to keep my views dry.

it’s great but now i’m needing partials that span across different
controllers, because i’m having duplicate files in my views.

i don’t know if this would actually work, but i was thinking of having
a Common controller for my partials and just rendering from there, but
i just thought i would post up and see what other developers are doing
or what the recommended way is.

any help would be great


Josh wrote:

any help would be great


you can create a ‘shared’ view directory. Then just reference them as

render :partial => ‘shared/view_name’


that was easy enough. thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs