Sha256: 666b13e0e7a563e0effcb7a0f4faa3fd33e989f344c65b87414dfde5b54a0911
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
outpost-cms-0.0.3 | lib/outpost/helpers/naming.rb |