Sha256: 55052068c5ff8e00c948685a0da5eae9ed2b7fc25285cb44b84c0610867f1564

Contents?: true

Size: 273 Bytes

Versions: 16

Compression:

Stored size: 273 Bytes

Contents

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

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
gaku_core-0.3.0 app/decorators/gaku/course_decorator.rb
gaku_core-0.3.0.pre.4 app/decorators/gaku/course_decorator.rb
gaku_core-0.3.0.pre.3 app/decorators/gaku/course_decorator.rb
gaku_core-0.3.0.pre.2 app/decorators/gaku/course_decorator.rb
gaku_core-0.3.0.pre.1 app/decorators/gaku/course_decorator.rb
gaku_core-0.3.0.pre.0 app/decorators/gaku/course_decorator.rb
gaku-0.2.4 core/app/decorators/gaku/course_decorator.rb
gaku_core-0.2.4 app/decorators/gaku/course_decorator.rb
gaku-0.2.3 core/app/decorators/gaku/course_decorator.rb
gaku_core-0.2.3 app/decorators/gaku/course_decorator.rb
gaku-0.2.2 core/app/decorators/gaku/course_decorator.rb
gaku_core-0.2.2 app/decorators/gaku/course_decorator.rb
gaku-0.2.1 core/app/decorators/gaku/course_decorator.rb
gaku_core-0.2.1 app/decorators/gaku/course_decorator.rb
gaku-0.2.0 core/app/decorators/gaku/course_decorator.rb
gaku_core-0.2.0 app/decorators/gaku/course_decorator.rb