philomena/lib/philomena_web/controllers/image/favorites_controller.ex
2019-12-03 23:14:56 -05:00

11 lines
No EOL
343 B
Elixir

defmodule PhilomenaWeb.Image.FavoritesController do
use PhilomenaWeb, :controller
alias Philomena.Images.Image
plug :load_and_authorize_resource, model: Image, id_name: "image_id", persisted: true, preload: [faves: :user]
def index(conn, _params) do
render(conn, "index.html", layout: false, image: conn.assigns.image)
end
end