Hi I was wondering what the best way to do the view for a single page website similar to http://2012.buildconf.com . It’s not an app as such, just one long website with navigation linking to each section. Currently I have one home controller which instantiates all the sections to the section instance variables and one long view! The page navigation is called from a helper so I don’t repeat myself, and I guess I could break each section out into it’s own partial, but isn’t that just creating a junk drawer.
For very simple sites such as these, I’ll often use Sinatra over Rails.
If you think it might grow in the future (they usually do), and would prefer to use Rails, I’d check out high_voltage: GitHub - thoughtbot/high_voltage: Easily include static pages in your Rails app.
We made it for dealing with almost exactly this situation.
Thanks Ben,
I have looked at the High Voltage gem and used it for one or two static pages. Does it have functionality to help break down a really long page with multiple logical sections, or would you recommend just having a long view page or breaking out the logical sections into partials?
I usually break long pages apart into partials (this isn’t part of high_voltage, it’s built into Rails).
Cool Ben, that’s what I thought. Much appreciated.