Question

This seems like it should not be that hard but I am trying to figure out how to create a 'snapshot' or 'locked' view from one on my views. This view currently is dynamic but I want to lock it so that any changes I make will not propagate until I want them too.

This would be a front facing page that should not get updated until I choose to update it such as by timestamping a field like updated_lock or something to that effect.

Any ideas?

Thanks, BR

Was it helpful?

Solution

You might try caches_action in your controller. It will create the static version and save it. You could either create it in dev and checkin, or have it generated in production. You'd need to fine a way to delete it in production if it's not checked in. Requires caching to be turned on.

If you are OK with checking it in - you can always save from the browser.

Basically - if there is a file in public at the same location as the view, it will be served instead of the dynamic one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top