Genshin/GAKUEngine

View on GitHub
core/app/decorators/gaku/course_decorator.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Gaku
  class CourseDecorator < Draper::Decorator
    decorates 'Gaku::Course'
    delegate_all

    def code_with_syllabus_name
      if object.syllabus_name
        "#{object.syllabus_name}-#{object.code}"
      else
        object.code
      end
    end
  end
end