Refactor conn aliasing in controller tests to use pipe chains
Applied refactor_conn_aliasing.sh to eliminate conn shadowing. Show draft posts in test and dev
This commit is contained in:
@@ -110,6 +110,11 @@ defmodule Blogex do
|
||||
* `Blogex.Router` — mountable Plug router
|
||||
"""
|
||||
|
||||
@doc "Returns true if draft posts should be visible (dev/test environments)."
|
||||
def show_drafts? do
|
||||
Application.get_env(:blogex, :show_drafts, false)
|
||||
end
|
||||
|
||||
defdelegate blogs, to: Blogex.Registry
|
||||
defdelegate get_blog!(blog_id), to: Blogex.Registry
|
||||
defdelegate get_blog(blog_id), to: Blogex.Registry
|
||||
|
||||
Reference in New Issue
Block a user