Skip to content

Instantly share code, notes, and snippets.

namespace :bundler do
desc "Updates gems using bundler"
task :update_gems do
run "cd #{release_path} && bundle install vendor --disable-shared-gems --relock --without test"
end
end
namespace :db do
desc "Symlink database.yml config file"
task :symlink_config do
DVORAK = {
:a => 0,
:b => 4,
:c => 2,
:d => 1,
:e => 0,
:f => 2,
:g => 2,
:h => 0,
:i => 1,
def display_standard_flashes(message = 'There were some problems with your submission:')
if flash[:notice]
flash_to_display, level = flash[:notice], 'notice'
elsif flash[:warning]
flash_to_display, level = flash[:warning], 'warning'
elsif flash[:error]
level = 'error'
if flash[:error].instance_of?( ActiveRecord::Errors) || flash[:error].is_a?( Hash)
flash_to_display = message
flash_to_display << activerecord_error_list(flash[:error])