mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
13 lines
235 B
Ruby
13 lines
235 B
Ruby
# frozen_string_literal: true
|
|
|
|
module OpenFoodNetwork
|
|
module HtmlHelper
|
|
def html_save_and_open(html)
|
|
require "launchy"
|
|
file = Tempfile.new('html')
|
|
file.write html
|
|
Launchy.open(file.path)
|
|
end
|
|
end
|
|
end
|