BootstrapFeedbacker provides a modal form to collect user feedback and sends it in an email including the current page URL to the configured email address.
- Rails 6.0 or higher with Import Maps, Turbo Frames, and Stimulus
- Bootstrap version 4
- User model with an email attribute
- current_user method defined in ApplicationController
- Add the
bootstrap_feedbackergem to your Gemfile:
gem"bootstrap_feedbacker"Run
bundle install.Run
rails bootstrap_feedbacker:install:migrations.Run
rails db:migrateto add the bootstrap_feedbacker_remarks table to your schema.Mount the engine in your routes.rb file:
mountBootstrapFeedbacker::Engine,at: '/bootstrap_feedbacker'- Add the bootstrap feedbacker link and modal container to a view file:
<%= bootstrap_feedbacker_link %><%= bootstrap_feedbacker_modal %>Create config/initializersbootstrap_feedbacker.rb and set your email address:
BootstrapFeedbacker::SETTINGS.email_to='support@yourdomain.com'Or set your email address and override any of these default settings:
BootstrapFeedbacker::SETTINGS.updatedo |settings|
settings.email_to='support@yourdomain.com'settings.email_prefix='[FEEDBACKER]'# defaultsettings.modal_content_id='bootstrap_feedbacker_remark_modal_content'# defaultsettings.modal_id='bootstrap_feedbacker_remark_modal'# defaultsettings.user_class='User'# defaultsettings.user_name_method=:name# defaultendBootstrap Feedbacker is released under the MIT License.