personal-certificate/app/helpers/admin/certificates_helper.rb

9 lines
290 B
Ruby
Raw Normal View History

2016-03-09 07:05:14 +00:00
module Admin::CertificatesHelper
def page_for_certificate(course_object)
page = nil
pages = Page.where(:module=>"certificate")
page = pages.first if page.nil?
request.protocol+(request.host_with_port+page.url+'/'+course_object.to_param).gsub('//','/') rescue "/"
end
end