Sha256: c8f1239aea08af6c9aa6efd4081e2d99262ea534be7fd17746771fa9b375735f
Contents?: true
Size: 466 Bytes
Versions: 7
Compression:
Stored size: 466 Bytes
Contents
## # Naming # # Some naming helpers. # # Example: # # Outpost::Helpers::Naming.to_class("outpost/news_stories") module Outpost module Helpers module Naming extend self # These helpers expect a controller param, # such as 'outpost/news_stories' # "outpost/news_stories" => NewsStory def to_class(controller) controller.singularize.camelize.demodulize.constantize end end # Naming end # Helpers end # Outpost
Version data entries
7 entries across 7 versions & 1 rubygems