Module: PagesCore::HumanizableParam
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActiveSupport::Inflector
- Defined in:
- app/models/concerns/pages_core/humanizable_param.rb
Instance Method Summary collapse
Instance Method Details
#humanized_param(slug) ⇒ Object
8 9 10 11 12 13 |
# File 'app/models/concerns/pages_core/humanizable_param.rb', line 8 def humanized_param(slug) safe_slug = safe_humanized_param(slug) return id.to_s if safe_slug.blank? "#{id}-#{safe_slug}" end |