lib/express_templates/components/capabilities/resourceful.rb in express_templates-0.7.1 vs lib/express_templates/components/capabilities/resourceful.rb in express_templates-0.8.0

- old
+ new

@@ -1,9 +1,21 @@ module ExpressTemplates module Components module Capabilities module Resourceful + + def self.included(base) + base.class_eval do + has_option :collection, 'Provide an explicit collection as a resource.' + has_option :collection_path, 'Provide an explicit path for the collection resource.' + has_option :resource_class, 'Overrides namespaced resource_class for using resources from a different module or namespace.' + has_option :resource_path, 'Overides the resource path which is otherwise inferred from the class name.' + has_option :path_prefix, 'Rarely used. Override inferred path_prefix for path helpers.' + has_option :namespace, 'Rarely used. Overrides inferred namespace for resources.' + end + end + def namespace config[:namespace] || infer_namespace end def path_prefix