From ed2218273ad4d3fb470e16a5e8d31a2a31524ea7 Mon Sep 17 00:00:00 2001 From: Dan Jensen Date: Thu, 28 Jan 2021 16:57:02 -0600 Subject: [PATCH] Give namespace example in README Previously it was not clear how to create a namespaced decorator, so this adds an example to the README. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a7b65fba..faecb3fb 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,15 @@ class ArticleDecorator < Draper::Decorator end ``` +Namespaced models live in namespaced subdirectories: + +```ruby +# app/decorators/help/article_decorator.rb +class Help::ArticleDecorator < Draper::Decorator +# ... +end +``` + ### Generators To create an `ApplicationDecorator` that all generated decorators inherit from, run...