Module: OgAdminHelper

Defined in:
lib/part/admin/og/controller.rb

Overview

– Some helper methods. Also used by the extended enchanting code. ++

Instance Method Summary collapse

Instance Method Details

#class_to_name(klass) ⇒ Object



13
14
15
# File 'lib/part/admin/og/controller.rb', line 13

def class_to_name(klass)
  klass.to_s.gsub(/::/, '-')
end

#name_to_class(name) ⇒ Object



17
18
19
# File 'lib/part/admin/og/controller.rb', line 17

def name_to_class(name)
  constant(CGI.unescape(name.gsub(/-/, '::')))
end