The answer - at least to my question - is rather convoluted, and requires a great deal of digging into the innards of the Rails stack! I'm merely copy-cat'ing here: go see the complete answer in José Valím's book, Crafting Rails Applications!
With Rails 3.2.1 (possibly even before) templates (as in eg. app/views/posts/show.haml) are 'found' by something called a Resolver, and it is possible to add ones own Resolver - which I did :)
I added a
class ViewTemplate < ActiveRecord::Base
class Resolver < ActionView::Resolver
def find_templates(name, prefix, partial, details)
conditions = {
:path => normalize_path(name, prefix),
:locale => normalize_array(details[:locale]).first,
:display_format => normalize_array(details[:formats]).first,
:handler => normalize_array(details[:handlers]),
:partial => partial || false
}
ViewTemplate.where(conditions).map do |record|
initialize_template(record)
end
end
end
end
and then I told my ApplicationController to look at my own path first:
class ApplicationController < ActionController::Base
append_view_path ViewTemplate::Resolver.new
end
and finally I added a record to my ViewTemplate with
ViewTemplate.create( content: '=render "form"', path: 'posts/edit', display_format: 'html', handler: 'haml' )
and replaced the contents of my views/layouts/application.haml with:
= render 'posts/edit'
and huzzah :)
(well, more or less - there are of cause issues like variables, and scopes - but hey, nothing is perfect)