Module: Tramway::ClassNameHelpers
- Included in:
- Tramway::Core::ApplicationDecorator
- Defined in:
- lib/tramway/helpers/class_name_helpers.rb
Instance Method Summary collapse
- #decorator_class_name(class_name = -> { model_class }.call) ⇒ Object
- #form_class_name(class_name = -> { model_class }.call) ⇒ Object
- #model_class_name(class_name) ⇒ Object
Instance Method Details
#decorator_class_name(class_name = -> { model_class }.call) ⇒ Object
8 9 10 |
# File 'lib/tramway/helpers/class_name_helpers.rb', line 8 def decorator_class_name(class_name = -> { model_class }.call) "#{class_name}Decorator".constantize end |
#form_class_name(class_name = -> { model_class }.call) ⇒ Object
12 13 14 |
# File 'lib/tramway/helpers/class_name_helpers.rb', line 12 def form_class_name(class_name = -> { model_class }.call) "#{class_name}Form".constantize end |
#model_class_name(class_name) ⇒ Object
4 5 6 |
# File 'lib/tramway/helpers/class_name_helpers.rb', line 4 def model_class_name(class_name) class_name.constantize end |