9 lines
275 B
Ruby
9 lines
275 B
Ruby
|
module Admin::CoursesHelper
|
||
|
def page_for_course(course_object)
|
||
|
page = nil
|
||
|
pages = Page.where(:module=>"course")
|
||
|
|
||
|
page = pages.first if page.nil?
|
||
|
request.protocol+(request.host_with_port+page.url+'/'+course_object.to_param).gsub('//','/') rescue "/"
|
||
|
end
|
||
|
end
|