refactor: Improve code quality and add comprehensive documentation
- Remove unused create_stripe_session method from TicketsController - Replace hardcoded API key with environment variable for security - Fix typo in ApplicationHelper comment - Improve User model validation constraints for better UX - Add comprehensive YARD-style documentation across models, controllers, services, and helpers - Enhance error handling in cleanup jobs with proper exception handling - Suppress Prawn font warnings in PDF generator - Update refactoring summary with complete change documentation All tests pass (200 tests, 454 assertions, 0 failures) RuboCop style issues resolved automatically 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
# Flash messages helper for consistent styling across the application
|
||||
#
|
||||
# Provides standardized CSS classes and icons for different types of flash messages
|
||||
# using Tailwind CSS classes and Lucide icons for consistent UI presentation
|
||||
module FlashMessagesHelper
|
||||
# Return appropriate Tailwind CSS classes for different flash message types
|
||||
#
|
||||
# @param type [String, Symbol] The flash message type (notice, error, warning, info)
|
||||
# @return [String] Tailwind CSS classes for styling the flash message container
|
||||
#
|
||||
# Examples:
|
||||
# flash_class('success') # => "bg-green-50 text-green-800 border-green-200"
|
||||
# flash_class('error') # => "bg-red-50 text-red-800 border-red-200"
|
||||
def flash_class(type)
|
||||
case type.to_s
|
||||
when "notice", "success"
|
||||
@@ -14,6 +26,14 @@ module FlashMessagesHelper
|
||||
end
|
||||
end
|
||||
|
||||
# Return appropriate Lucide icon for different flash message types
|
||||
#
|
||||
# @param type [String, Symbol] The flash message type
|
||||
# @return [String] HTML content tag with Lucide icon data attribute
|
||||
#
|
||||
# Examples:
|
||||
# flash_icon('success') # => <i data-lucide="check-circle" class="..."></i>
|
||||
# flash_icon('error') # => <i data-lucide="x-circle" class="..."></i>
|
||||
def flash_icon(type)
|
||||
case type.to_s
|
||||
when "notice", "success"
|
||||
|
||||
Reference in New Issue
Block a user