views:

23

answers:

0

Hi all,

I'm new to Ruby on Rails, looking at using it for an app that I need to create. The story is:

I'm using rails generate scaffold Page url:string parent:string content:text to create a Page scaffold. So we can then input a URL (hello-there.htm), a parent (my-folder) and lots of text, images, etc for the page into a web form, and have it stored.

Once this is all in the SQLite database, it needs to be exported to lots of HTML files. So, on disk somewhere, I need each parent folder to be created, filled with HTML files which themselves contain the content (plus a static header/footer):

other-folder/index.htm
other-folder/another-file.htm
my-folder/hello-there.htm

Sorry, I know this is a really vague, hand-wavy question. My gut says I could/should use an Export view/controller (localhost:3000/export) which has a big button on it? But if you have something, anything I could read, it would be appreciated. Modifying the view for each page (localhost:3000/pages/12) is easy, but what do I do when I need loads of actual .htm files?

I wish I could post some code, but obviously there isn't any yet :(

Cheers,

Alex


Maran links to Webby below, which looks perfect for my needs!