Project

carefully

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Ask for confirmation before destroying ActiveRecord::Base objects in specific environments
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.16
~> 10.0
 Project Readme

Carefully

Additional layer of security when performing actions through rails console in sensitive environments.

Installation

Add to Gemfile

gem 'carefully'

Run from terminal

rails g carefully

Optionally you can edit config in config/intializers/carefully.rb

Usage

Add this to models for which you want to be prompted when destroying it's instances:

include Carefully

You might as well include it in your ActiveRecord::Base wrapper class (like ApplicationRecord) to have it for all models.

Disabling the prompt

You can disable the prompting for blocks like this:

Carefully.allow_all do
  this.destroy
  that.destroy
  everything.destroy
end

None of these actions will require to be confirmed this way.