Module: Cms::Behaviors::Naming

Defined in:
lib/cms/behaviors/naming.rb

Overview

Assumes the ‘extended’ class is an instance of ActiveModel

Instance Method Summary collapse

Instance Method Details

#path_nameObject

Returns the name of this content block as it will appear in paths.

Examples:

HtmlBlock -> html_blocks
Thing -> things


11
12
13
# File 'lib/cms/behaviors/naming.rb', line 11

def path_name
  model_name.element.pluralize
end