From 65e42ceee390ac84a128a3db6486ca87226f4b8a Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Tue, 9 Dec 2025 14:59:07 +0000 Subject: [PATCH] Remove Travis CI badge and improve dropdown selection handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Removed broken Travis CI build status badge from README header 2. Enhanced dropdown selection on messages page: - Added explicit JavaScript change event handler - Added CSS to ensure proper text color and background - Added blur/focus to force visual update after selection - Added console logging for debugging This should resolve the issue where selected recipient names weren't displaying properly in the dropdown after selection. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- README.md | 2 +- app/views/messages/index.html.erb | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fdb1d12..30fbfeb 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# RailsGoat [![Build Status](https://api.travis-ci.org/OWASP/railsgoat.png?branch=master)](https://travis-ci.org/OWASP/railsgoat) +# RailsGoat RailsGoat is a vulnerable version of the Ruby on Rails Framework from versions 3 to 6. It includes vulnerabilities from the OWASP Top 10, as well as some "extras" that the initial project contributors felt worthwhile to share. This project is designed to educate both developers, as well as security professionals. diff --git a/app/views/messages/index.html.erb b/app/views/messages/index.html.erb index a239679..1a83d46 100644 --- a/app/views/messages/index.html.erb +++ b/app/views/messages/index.html.erb @@ -158,6 +158,14 @@ $(document).on('turbolinks:load', function() { makeActive(); }); +// Explicitly handle dropdown selection to ensure display updates +$('#message_receiver_id').on('change', function() { + var selectedText = $(this).find('option:selected').text(); + console.log('Selected recipient:', selectedText); + // Force a visual update + $(this).blur().focus(); +}); + // Form submission with AJAX $("#submit_button").click(function(event) { event.preventDefault(); @@ -306,4 +314,19 @@ $("#submit_button").click(function(event) { justify-content: center; } } + + /* Ensure dropdown displays selected value properly */ + #message_receiver_id { + color: #212529; + background-color: #fff; + } + + #message_receiver_id option { + color: #212529; + } + + #message_receiver_id:focus { + border-color: var(--rg-success); + box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.1); + }