diff --git a/app/controllers/yiff_rest/api_v2/images_controller.rb b/app/controllers/yiff_rest/api_v2/images_controller.rb
index 4ff7c28..9369e39 100644
--- a/app/controllers/yiff_rest/api_v2/images_controller.rb
+++ b/app/controllers/yiff_rest/api_v2/images_controller.rb
@@ -58,6 +58,7 @@ module YiffRest
end
def iqdb
+ @sp = {}
end
def query_iqdb
diff --git a/app/views/yiff_rest/api_v2/manage/_nav.html.erb b/app/views/yiff_rest/api_v2/manage/_nav.html.erb
index e58eff6..09bb857 100644
--- a/app/views/yiff_rest/api_v2/manage/_nav.html.erb
+++ b/app/views/yiff_rest/api_v2/manage/_nav.html.erb
@@ -9,13 +9,13 @@
-
- <%= link_to "Home", yiff_rest_api_v2_manage_index_path, class: "nav-link#{if_active(' active', path: yiff_rest_api_v2_manage_index_path)}" %>
+ <%= link_to("Home", yiff_rest_api_v2_manage_index_path, class: "nav-link#{if_active(' active', path: yiff_rest_api_v2_manage_index_path)}") %>
<% if params[:controller] == "yiff_rest/api_v2/manage" %>
<% elsif params[:controller] == "yiff_rest/api_v2/images" %>
<% if %w[index iqdb query_iqdb].include?(params[:action]) %>
-
- <%= link_to "Upload Image", new_yiff_rest_api_v2_manage_image_path(api_image: ({ category: @sp[:category] } if @sp[:category])), class: "nav-link#{if_active(' active', path: new_yiff_rest_api_v2_manage_image_path(manage_id: params[:id]))}" %>
+ <%= link_to("Upload Image", new_yiff_rest_api_v2_manage_image_path(api_image: ({ category: @sp[:category] } if @sp[:category])), class: "nav-link#{if_active(' active', path: new_yiff_rest_api_v2_manage_image_path(manage_id: params[:id]))}") %>
<% else %>
<% category = params.dig(:api_image, :category) if params[:action] == "new" %>
@@ -23,7 +23,7 @@
<% category = @image.category if params[:action] == "edit" %>
<% if category %>
-
- <%= link_to "Back To Category", yiff_rest_api_v2_manage_images_path(search: { category: category }), class: "nav-link" %>
+ <%= link_to("Back To Category", yiff_rest_api_v2_manage_images_path(search: { category: category }), class: "nav-link") %>
<% end %>
<% end %>