         conn
         |> put_flash(:info, "Post Updated")
         |> redirect(to: post_path(conn, :show, post))
+
       {:error, changeset} ->
         render(conn, "edit.html", post: post, changeset: changeset)
     end
   end
 
   defp load_channels(conn, _) do
-    query = Channel
-    |> Channel.names_and_ids
-    |> Channel.alphabetized
+    query =
+      Channel
+      |> Channel.names_and_ids()
+      |> Channel.alphabetized()
 
     channels = Repo.all(query)
     assign(conn, :channels, channels)


  def show(%{assigns: %{slug: slug}} = conn, _) do
    format = Controller.get_format(conn)
    post = Post
    |> Repo.get_by!(slug: slug)
    |> Repo.preload([:channel])
    |> Repo.preload([:developer])

    conn
    |> assign_post_canonical_url(post)


    case Repo.insert(changeset) do
      {:ok, post} ->
        Notifications.post_created(post)

        conn
