ben vandgrift · on living the dream

Rails 3: Cascading View Paths

problem: you need to use varying view logic depending on circumstance. you want this to cascade down a view hierarchy, defaulting with the views in app/views.

an example? consider a mobile site deployment. your regular site is all flashy, your mobile site needs to be very thin. yes, the example may be a bit contrived, work with me.<

given the work this actually does, you probably don't want to put it in a controller and watch your performance tank.

written: Nov 30 2010