繁体   English   中英

如何与“知道链接的任何人”共享Rails 3 / gem'google_drive'

[英]How to share with “Anyone with the link” Rails 3 / gem 'google_drive'

使用Rails 3.2.13和gem'google_drive'

在我的控制器中:

session = GoogleDrive.login("*@gmail.com", "***")    
session.create_spreadsheet("My new sheet")
ws = session.spreadsheet_by_title('My new sheet').worksheets[0]
ws[2, 1] = "foi3o"
ws[2, 2] = "bar321643"
ws.save()

如何将共享设置为“知道链接的人”? 目前,它仅创建一个私有工作表。

spreadsheet.acl.push({:scope_type => "default", :with_key => true, :role => "writer"})

gem来源中的更多信息: https : //github.com/gimite/google-drive-ruby/blob/master/lib/google_drive/acl.rb

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM