Usptream sync

This commit is contained in:
Senad Uka
2020-07-20 13:28:40 +00:00
parent add8304eab
commit 40f241b75f
74 changed files with 12779 additions and 71 deletions

View File

@@ -13,6 +13,18 @@ class QrCode
new(url, "#{filename}.png")
end
def self.build_from_multiple_contract_templates(contract_templates, project)
account = project.account
locale = I18n.locale
host = AppHost.new.domain_with_port
route = [account, project, :contract_templates, contract_template_ids: contract_templates.ids, locale: I18n.locale, host: AppHost.new.domain_with_port]
url = Rails.application.routes.url_helpers.url_for(route)
filename = [project.account.name, project.name].map(&:parameterize).join("_")
new(url, "#{filename}.png")
end
def initialize(url, filename = "qrcode.png")
@url = url
@filename = filename