From 836fe3138552defff447ebd50271225d29bae91c Mon Sep 17 00:00:00 2001 From: Mohnish G J Date: Tue, 20 Sep 2016 08:21:50 +0530 Subject: [PATCH] Add an alias for Rails console sandbox (#5316) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The command ‘rails console —sandbox’ loads our Rails application, connects to the database and automatically starts a database transaction. All database operations performed within this console session are rolled back upon leaving the console. Reference - https://www.codeschool.com/blog/2014/06/17/rails-console-sandbox/ --- plugins/rails/rails.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index e532639b5..c8974b5f4 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -36,6 +36,7 @@ alias -g RET='RAILS_ENV=test' # Rails aliases alias rc='rails console' +alias rcs='rails console --sandbox' alias rd='rails destroy' alias rdb='rails dbconsole' alias rg='rails generate'