A Rails engine that provides a seamless, modal-based feedback system for any Rails application. Users can submit feedback without leaving your main application, and the system can integrate with the TDX API for ticket creation when enabled.
- Modal-based feedback system - No page navigation required
- Seamless integration - Drop into any Rails application
- TDX API integration - Optionally creates support tickets (when enabled)
- Responsive design - Works on all device sizes
- Customizable styling - Easy to match your app's design
- Authentication support - Optional user authentication requirement
- Stimulus-powered - Modern JavaScript framework integration
- Generator-wired assets - Installer adds the JavaScript and CSS for you
Add to your Gemfile:
gem 'tdx_feedback_gem', git: 'https://github.com/lsa-mis/tdx-feedback_gem.git'
bundle install
rails generate tdx_feedback_gem:install
rails db:migrate
Add the engine to your host app routes (recommended mount path shown):
# config/routes.rb
mount TdxFeedbackGem::Engine => '/tdx_feedback_gem'
Recompile your assets:
bundle exec rake assets:clobber && bundle exec rake dartsass:build
bundle exec rake assets:precompile
That's it! The gem automatically:
- ✅ Creates the necessary database migration
- ✅ Sets up the initializer with default configuration
- ✅ Copies the Stimulus controller to your app
- ✅ Includes the CSS styles in your asset pipeline
- ✅ Registers the helper methods globally
Edit config/initializers/tdx_feedback_gem.rb
if you need custom settings:
TdxFeedbackGem.configure do |config|
config.require_authentication = true
config.enable_ticket_creation = false
config.oauth_scope = 'tdxticket'
config.title_prefix = '[Feedback]'
# TDX API credentials (use Rails credentials or environment variables)
config.app_id = 31
config.type_id = 12
config.status_id = 77
config.source_id = 8
config.service_id = 67
config.responsible_group_id = 631
end
Add to your layout or views:
<%= feedback_system(trigger: :link, text: 'Feedback', class: 'tdx-feedback-footer-link') %>
<%= feedback_system(trigger: :button, text: 'Send Feedback') %>
<%= feedback_footer_link %>
<%= feedback_header_button %>
If you mount the engine at a different path than /tdx_feedback_gem
, either:
- Pass custom URLs via Stimulus values on your trigger element:
data-tdx-feedback-new-url-value="/feedback/feedbacks/new"
data-tdx-feedback-submit-url-value="/feedback/feedbacks"
- Or mount at
/tdx_feedback_gem
to use the controller defaults.
The gem automatically resolves configuration from:
- Rails Encrypted Credentials (recommended)
- Environment Variables
- Built-in defaults
Enable/disable TDX ticket creation without redeploying:
export TDX_ENABLE_TICKET_CREATION=true
- 📚 Wiki - Complete documentation, examples, and guides
- � Getting Started - Quick overview and setup details
- ⚙️ Configuration Guide - Credentials, env vars, and defaults
- 🔧 Integration Examples - Rails 5/6/7, authentication systems
- 🎨 Styling and Theming - Customization and theming
- 🧪 Testing Guide - Test setup and coverage
- 🩺 Troubleshooting - Common issues and fixes
- 📊 API Schemas - TDX API specifications
- 🧰 Helper Methods Reference - All view helpers and options
- ⚡ Stimulus API Reference - Controller events and targets
git clone https://github.com/lsa-mis/tdx-feedback_gem.git
cd tdx-feedback_gem
bundle install
bundle exec rspec
Bug reports and pull requests are welcome on GitHub.
The gem is available as open source under the terms of the MIT License.