diff --git a/app/controllers/config_controller.rb b/app/controllers/config_controller.rb index d507e1c9..6ec57bed 100644 --- a/app/controllers/config_controller.rb +++ b/app/controllers/config_controller.rb @@ -6,6 +6,7 @@ def index def show @definition = Sites.from_enum(params[:id]) + raise ActiveRecord::RecordNotFound unless @definition end def modify diff --git a/app/views/stats/index.html.erb b/app/views/stats/index.html.erb index 92a36b9a..fe934bd4 100644 --- a/app/views/stats/index.html.erb +++ b/app/views/stats/index.html.erb @@ -16,7 +16,7 @@ <% entry = @counts[definition.site_type] || {} %> <% next unless definition.scraper? || entry["file_count"] %> - <%= link_to_if(definition.site_type != "manual", definition.display_name, config_path(definition.site_type)) %> + <%= link_to_if(definition.scraper?, definition.display_name, config_path(definition.site_type)) %> <%= link_to(entry["artist_count"] || 0, artists_path(search: { site_type: definition.site_type })) %> <%= link_to(entry["url_count"] || 0, artist_urls_path(search: { site_type: definition.site_type })) %> <%= link_to(entry["submission_count"] || 0, submission_files_path(search: { site_type: definition.site_type })) %>