Sha256: 7f098b8209f76177d7b6ab58fbf2e209609945f5acaa25d4b8ec7411360c2e81

Contents?: true

Size: 493 Bytes

Versions: 46

Compression:

Stored size: 493 Bytes

Contents

module Gaku::ClassNameDetector

  def class_name
    "Gaku::#{controller_name.classify}"
  end

  def class_name_minus_enrollment
    "Gaku::#{controller_name.classify.split('Enrollment').first}"
  end

  def class_name_underscored
    controller_name.classify.split('Enrollment').first.underscore
  end

  def class_name_underscored_plural
    class_name_underscored.pluralize
  end

  def enrollment_param
    "#{controller_name.classify.split('Enrollment').first.underscore}_id"
  end

end

Version data entries

46 entries across 39 versions & 3 rubygems

Version Path
gaku_frontend-0.3.0 lib/gaku/class_name_detector.rb
gaku_core-0.3.0 lib/gaku/class_name_detector.rb
gaku_frontend-0.3.0.pre.4 lib/gaku/class_name_detector.rb
gaku_core-0.3.0.pre.4 lib/gaku/class_name_detector.rb
gaku_frontend-0.3.0.pre.3 lib/gaku/class_name_detector.rb
gaku_core-0.3.0.pre.3 lib/gaku/class_name_detector.rb
gaku_frontend-0.3.0.pre.2 lib/gaku/class_name_detector.rb
gaku_core-0.3.0.pre.2 lib/gaku/class_name_detector.rb
gaku_frontend-0.3.0.pre.1 lib/gaku/class_name_detector.rb
gaku_core-0.3.0.pre.1 lib/gaku/class_name_detector.rb
gaku_frontend-0.3.0.pre.0 lib/gaku/class_name_detector.rb
gaku_core-0.3.0.pre.0 lib/gaku/class_name_detector.rb
gaku-0.2.4 core/lib/gaku/class_name_detector.rb
gaku-0.2.4 frontend/lib/gaku/class_name_detector.rb
gaku_frontend-0.2.4 lib/gaku/class_name_detector.rb
gaku_core-0.2.4 lib/gaku/class_name_detector.rb
gaku-0.2.3 core/lib/gaku/class_name_detector.rb
gaku-0.2.3 frontend/lib/gaku/class_name_detector.rb
gaku_frontend-0.2.3 lib/gaku/class_name_detector.rb
gaku_core-0.2.3 lib/gaku/class_name_detector.rb