Class: RailsAngularSeo::Renderer
- Inherits:
-
Object
- Object
- RailsAngularSeo::Renderer
- Defined in:
- lib/rails_angular_seo/renderer.rb
Class Method Summary collapse
Class Method Details
.render(phantomjs_path, seo_id, path_without_port, options = {}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/rails_angular_seo/renderer.rb', line 4 def self.render(phantomjs_path, seo_id, path_without_port, = {}) output = "" = {phantomjs_options: []}.merge() = [phantomjs_path] + [:phantomjs_options] + [File.("../../../phantomjs/phantomjs-runner.js", __FILE__), path_without_port, seo_id] output = IO.popen(){|phantom_output| output = phantom_output.read} [200, { "Content-Type" => "text/html" }, [output]] end |