Skip to content

Repository files navigation

BootstrapFeedbacker

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.

Requirements

  • 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

Installation

  1. Add the bootstrap_feedbacker gem to your Gemfile:
gem"bootstrap_feedbacker"
  1. Run bundle install.

  2. Run rails bootstrap_feedbacker:install:migrations.

  3. Run rails db:migrate to add the bootstrap_feedbacker_remarks table to your schema.

  4. Mount the engine in your routes.rb file:

mountBootstrapFeedbacker::Engine,at: '/bootstrap_feedbacker'
  1. Add the bootstrap feedbacker link and modal container to a view file:
<%= bootstrap_feedbacker_link %><%= bootstrap_feedbacker_modal %>

Configure

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# defaultend

License

Bootstrap Feedbacker is released under the MIT License.

About

Provides a tab for users to contact developers from within the application

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages