Skip to content

Update Ruby version, gem dependencies, enhance error handling, admin dashboard improvements#92

Merged
rsmoke merged 14 commits intomainfrom
staging
Mar 24, 2026
Merged

Update Ruby version, gem dependencies, enhance error handling, admin dashboard improvements#92
rsmoke merged 14 commits intomainfrom
staging

Conversation

@rsmoke
Copy link
Copy Markdown
Member

@rsmoke rsmoke commented Mar 24, 2026

This pull request introduces several updates across the codebase, primarily focusing on improving the admin dashboard with a new "Special invitees" panel, updating Ruby and gem versions, and standardizing the HTTP status code for unprocessable content throughout the application and tests. The changes also enhance test coverage for the new dashboard features.

Admin Dashboard Improvements:

  • Added a "Special invitees" panel to the admin dashboard (app/admin/dashboard.rb). This panel lists users with "special" or "scholarship" payment types, displays their email, application status (with a link if an application exists), and account type. It also improves the applications panel to show the latest 25 applications and a link to view all. [1] [2]
  • Added comprehensive request specs to test the new "Special invitees" panel and its behavior.

Dependency and Environment Updates:

  • Upgraded Ruby version from 3.3.4 to 3.4.9 and updated related gems, including activeadmin, devise, and added ostruct. [1] [2]

Status Code Standardization:

  • Replaced all instances of :unprocessable_entity (HTTP 422) with :unprocessable_content for JSON error responses in controllers, the Devise initializer, and tests, ensuring consistency with updated conventions. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Testing and Mock Enhancements:

  • Improved application mocks to support new dashboard queries by adding count, order, and limit methods.
  • Updated request specs for the admin dashboard to use factory methods for creating ApplicationSetting instances.

These changes collectively improve the admin experience, modernize the codebase, and ensure consistency in API responses and testing.

rsmoke and others added 14 commits March 24, 2026 09:55
- Bump Ruby version from 3.3.4 to 3.4.9 in both Gemfile and .tool-versions.
- Update 'activeadmin' to version '~> 3.5'.
- Specify 'devise' version to '~> 5.0', '>= 5.0.3'.
- Add 'ostruct' gem with version '~> 0.6.3'.
…cription fees

Updated the `total_cost` method to accurately compute total costs by incorporating subscription fees. Enhanced error handling and logging for better debugging. This change ensures consistent cost calculations across the application, improving overall robustness.
Bumps the bundler group with 1 update in the / directory: [activestorage](https://github.com/rails/rails).


Updates `activestorage` from 7.2.2.2 to 7.2.3.1
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v8.1.2.1/activestorage/CHANGELOG.md)
- [Commits](rails/rails@v7.2.2.2...v7.2.3.1)

---
updated-dependencies:
- dependency-name: activestorage
  dependency-version: 7.2.3.1
  dependency-type: indirect
  dependency-group: bundler
...

Signed-off-by: dependabot[bot] <support@github.com>
…858f

Bump activestorage from 7.2.2.2 to 7.2.3.1 in the bundler group across 1 directory
…essable_content

Changed error status from :unprocessable_entity to :unprocessable_content in Devise initializer, ApplicationsController, ApplicationSettingsController, and relevant request specs. This update ensures consistency in error responses across the application.
… on exceptions

Updated the `total_cost` method in the PaymentsController to return a default value of 0.0 when exceptions occur during cost calculations. This change enhances error handling and improves the robustness of payment processing in the application.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ON format

Updated the test for rendering a response with a 422 status in the Applications request spec. The test now utilizes valid attributes and posts the application data in JSON format, improving clarity and consistency in error handling.
Added additional mock methods for `mock_active_applications` in the application mock to improve test coverage. Refactored admin dashboard specs to use `create` for `application_setting`, ensuring valid attributes are utilized and enhancing clarity in the tests.
@rsmoke rsmoke merged commit 2f4e675 into main Mar 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant