Conditional haml vs. erb precedence

Hi all,

I've got a Rails app that I'm converting over to using HAML as part of
a redesign. During the conversion process, we want to keep the new
views away from most of our users until they're ready for public beta.
Is there a master
switch I can flip, like in a controller before_filter, that would
tell
Rails to render ERB rather than HAML when both template types exist?
By default the HAML will always be rendered, but I'd like to
configure
that.

Thanks!

Brent

Brent Miller wrote in post #963232:

During the conversion process, we want to keep the new
views away from most of our users until they're ready for public beta.

Umm... yeah, that's called dev environment vs production environment.
I've found it far easier to grant a beta a look into the dev environment
than to muck about in the production environment - that is supposed to
be production code, not the dev test branch.

Create a limited user for them to use in the dev environment during the
beta period, then just delete that user (or simply invalidate the
account if you like them and would use them as a beta again).

Nothing scores more brownie points with a beta (who is a volunteer after
all) than when they login for the next beta period and see all their
personal settings from the prior beta...

Unfortunately, that's not an option for us. We have to have side-by-
side coexistence for 6-8 weeks, and we must have all of our users'
data for them. Giving my clients access to my dev servers isn't
structurally possible, anyway. We have to many safeguards in place to
shield our dev servers from the prying eyes of the internets. :slight_smile:

Please don't top post, it makes it difficult to follow the thread.
Insert your comments in the previous message. Thanks.

Unfortunately, that's not an option for us. We have to have side-by-
side coexistence for 6-8 weeks, and we must have all of our users'
data for them. Giving my clients access to my dev servers isn't
structurally possible, anyway. We have to many safeguards in place to
shield our dev servers from the prying eyes of the internets. :slight_smile:

Set up the version with the ongoing development as a separate app with
its own URL (on the same database). Then your guinea pig users can
use that one whilst the rest continue as normal.

Colin

Colin: Thanks for the suggestion. That's not a bad workaround, but we
can't roll out the required infrastructure to do that. Duplicating our
existing staging/production setup would require too much cost and
effort. :frowning:

I guess what I'm really asking is, where in the Rails code base does the
template format get decided? Where in the code is haml chosen over erb?
With that in hand, I could get insert some conditional logic in there
and achieve what I'm looking for.

PLease quote when replying.

Brent Miller wrote in post #965738:

Colin: Thanks for the suggestion. That's not a bad workaround, but we
can't roll out the required infrastructure to do that. Duplicating our
existing staging/production setup would require too much cost and
effort. :frowning:

Then you can't afford to be developing the site in the first place.

No, really. I'm not saying you need to duplicate absolutely
*everything*, but you should at least have a public beta box on which
you can do this. It could even be the same box as your production
server! Just run a separate instance of the Rails app.

I guess what I'm really asking is, where in the Rails code base does the
template format get decided? Where in the code is haml chosen over erb?
With that in hand, I could get insert some conditional logic in there
and achieve what I'm looking for.

But that's the wrong way to do it.

Best,