use struct instead of keyword

This commit is contained in:
byte[] 2019-11-17 20:33:50 -05:00
parent 19c9bcb3c0
commit 0a62a3d5ce
3 changed files with 17 additions and 7 deletions

View file

@ -18,7 +18,7 @@ defmodule Philomena.Textile.Renderer do
parsed =
posts
|> Enum.map(fn post ->
Parser.parse(@parser, post[:body])
Parser.parse(@parser, post.body)
end)
images =

View file

@ -22,20 +22,20 @@ defmodule PhilomenaWeb.CommissionController do
item_descriptions =
commission.items
|> Enum.map(&[body: &1.description])
|> Enum.map(&%{body: &1.description})
|> Renderer.render_collection()
item_add_ons =
commission.items
|> Enum.map(&[body: &1.add_ons])
|> Enum.map(&%{body: &1.add_ons})
|> Renderer.render_collection()
[information, contact, will_create, will_not_create] =
Renderer.render_collection([
[body: commission.information],
[body: commission.contact],
[body: commission.will_create],
[body: commission.will_not_create]
%{body: commission.information},
%{body: commission.contact},
%{body: commission.will_create},
%{body: commission.will_not_create}
])
rendered =

View file

@ -0,0 +1,10 @@
defmodule PhilomenaWeb.Topic.PostController do
use PhilomenaWeb, :controller
#alias Philomena.{Forums.Forum}
#alias Philomena.Posts
plug PhilomenaWeb.FilterBannedUsersPlug
plug PhilomenaWeb.CanaryMapPlug, create: :show, edit: :show, update: :show
plug :load_and_authorize_resource, model: Forum, id_field: "short_name", id_name: "forum_id", persisted: true
end