Add link to google spreadsheet
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user