diff --git a/lib/philomena/textile/renderer.ex b/lib/philomena/textile/renderer.ex index 475f75ba..933230a2 100644 --- a/lib/philomena/textile/renderer.ex +++ b/lib/philomena/textile/renderer.ex @@ -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 = diff --git a/lib/philomena_web/controllers/commission_controller.ex b/lib/philomena_web/controllers/commission_controller.ex index fa450472..a5d7e871 100644 --- a/lib/philomena_web/controllers/commission_controller.ex +++ b/lib/philomena_web/controllers/commission_controller.ex @@ -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 = diff --git a/lib/philomena_web/controllers/topic/post_controller.ex b/lib/philomena_web/controllers/topic/post_controller.ex new file mode 100644 index 00000000..0d602294 --- /dev/null +++ b/lib/philomena_web/controllers/topic/post_controller.ex @@ -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 \ No newline at end of file