Class: Certificate
Class Method Summary
collapse
Instance Method Summary
collapse
active_between, aggregate_of, all_except, defaults, #delete, #destroy!, enum_prefixed_translations_for, numbered, organic_on, resource_fields, #save, #save_and_notify!, #save_and_notify_changes!, serialize_symbolized_hash_array, teaser_on, #update_and_notify!, update_or_create!, whitelist_attributes, with_pg_retry, with_temporary_token
Methods included from WithPgLock
#with_pg_lock
Class Method Details
.code_size ⇒ Object
11
12
13
|
# File 'app/models/certificate.rb', line 11
def self.code_size
12
end
|
Instance Method Details
#filename ⇒ Object
15
16
17
|
# File 'app/models/certificate.rb', line 15
def filename
"#{title.parameterize.underscore}.pdf"
end
|
#for_user?(user) ⇒ Boolean
26
27
28
|
# File 'app/models/certificate.rb', line 26
def for_user?(user)
self.user == user
end
|
#template_locals ⇒ Object
19
20
21
22
23
24
|
# File 'app/models/certificate.rb', line 19
def template_locals
{ user: user,
certificate_program: certificate_program,
organization: organization,
certificate: self }
end
|