Add link to google spreadsheet

This commit is contained in:
2020-04-06 10:18:09 +02:00
parent 6e2d8dfc93
commit d55317fe43
2 changed files with 7 additions and 0 deletions

View File

@@ -11,6 +11,10 @@ class Form < ApplicationRecord
validates_presence_of :title
def google_spreadsheet_url
"https://docs.google.com/spreadsheets/d/#{google_spreadsheet_id}/edit" if google_spreadsheet_id.present?
end
def create_spreadsheet
sheets = Google::Apis::SheetsV4::SheetsService.new
sheets.authorization = user.google_authorization