Skip to content

Instantly share code, notes, and snippets.

@rafael
Created October 28, 2013 16:29
Show Gist options
  • Select an option

  • Save rafael/7200068 to your computer and use it in GitHub Desktop.

Select an option

Save rafael/7200068 to your computer and use it in GitHub Desktop.
publish static page.
def publish
html = render_to_string(template: "media_kits/preview",
layout: 'application' )
cache_page(html, "media_kits/#{@media_kit.publisher_profile.fqdn}")
redirect_to media_kit_path(@media_kit), notice: 'Media Kit Published'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment