more idiomatic

This commit is contained in:
byte[] 2020-08-08 15:13:41 -04:00
parent 2c121c80c8
commit 5249deb47f
5 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@ h1
= @fingerprint = @fingerprint
- route = fn p -> Routes.fingerprint_profile_tag_change_path(@conn, :index, @fingerprint, p) end - route = fn p -> Routes.fingerprint_profile_tag_change_path(@conn, :index, @fingerprint, p) end
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end - params = if @conn.params["added"], do: [added: @conn.params["added"]]
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block .block

View file

@ -5,7 +5,7 @@ h1
= @image.id = @image.id
- route = fn p -> Routes.image_tag_change_path(@conn, :index, @image, p) end - route = fn p -> Routes.image_tag_change_path(@conn, :index, @image, p) end
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end - params = if @conn.params["added"], do: [added: @conn.params["added"]]
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block .block

View file

@ -3,7 +3,7 @@ h1
= @ip = @ip
- route = fn p -> Routes.ip_profile_tag_change_path(@conn, :index, to_string(@ip), p) end - route = fn p -> Routes.ip_profile_tag_change_path(@conn, :index, to_string(@ip), p) end
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end - params = if @conn.params["added"], do: [added: @conn.params["added"]]
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block .block

View file

@ -4,7 +4,7 @@ h1
= @user.name = @user.name
- route = fn p -> Routes.profile_tag_change_path(@conn, :index, @user, p) end - route = fn p -> Routes.profile_tag_change_path(@conn, :index, @user, p) end
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end - params = if @conn.params["added"], do: [added: @conn.params["added"]]
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block .block

View file

@ -4,7 +4,7 @@ h1
= @tag.name = @tag.name
- route = fn p -> Routes.tag_tag_change_path(@conn, :index, @tag, p) end - route = fn p -> Routes.tag_tag_change_path(@conn, :index, @tag, p) end
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end - params = if @conn.params["added"], do: [added: @conn.params["added"]]
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block .block