Sha256: 806ce947fe4480a761ec42c5a9eb0e9de520beae95a8e386149b3d7a74786fa6

Contents?: true

Size: 672 Bytes

Versions: 7

Compression:

Stored size: 672 Bytes

Contents

get '/sample9' do
  haml :sample9
end

post '/sample9' do
  set :guid, params[:guid]
  set :width, params[:width]
  set :height, params[:height]

  begin
    raise "Please enter all required parameters" if settings.guid.empty? or settings.width.empty? or settings.height.empty?
    v_url = "https://apps.groupdocs.com/document-viewer/embed/#{settings.guid}?frameborder='0' width='#{settings.width}' height='#{settings.height}'"
      
    if v_url
      v_url = v_url
    end
  rescue Exception => e
    err = e.message
  end  
  
  haml :sample9, :locals => { :guid => settings.guid, :width => settings.width, :height => settings.height, :v_url=>v_url, :err => err }
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
groupdocs-1.2.8 examples/api-samples/samples/sample9.rb
groupdocs-1.2.7 examples/api-samples/samples/sample9.rb
groupdocs-1.2.6 examples/api-samples/samples/sample9.rb
groupdocs-1.2.3 examples/api-samples/samples/sample9.rb
groupdocs-1.2.2 examples/api-samples/samples/sample9.rb
groupdocs-1.2.1 examples/api-samples/samples/sample9.rb
groupdocs-1.2.0 examples/api-samples/samples/sample9.rb