This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update_bank_account | |
bank_account = BankAccount.find params[:bank_account_id] | |
bank_account.attributes = params[:bank_account] | |
bank_account.purgatory!(current_user) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%td.right{valign: "top"} | |
- if role[:user].email.present? && logs.present? | |
%em.status-label{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t("loan_steps.esignature_states.#{role[:state].downcase}_tooltip", email:role[:user].email, date: logs.first.created_at.to_s(:date_only), default: "#{role[:state]}"), class: role[:state].downcase} | |
=t("loan_steps.esignature_states.#{role[:state].downcase}") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def audit_required_messages | |
messages = [] | |
if requires_first_loans_audit? && !lender_program_config.exempt_from_first_loans_audit? | |
config = lender.try(:lender_config) || DefaultLenderConfig.new | |
messages << "less than #{config.new_partner_satisfaction_call_quantity} loans disbursed" | |
end | |
if vertical.try(:name) == "Home Improvement" | |
messages << "Home Improvement loan" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializer/delayed_job.rb | |
module Delayed | |
module Plugins | |
class Flaming < Plugin | |
callbacks do |lifecycle| | |
lifecycle.around(:invoke_job) do |job, *args, &block| | |
HelperMethods.flaming(name: "DELAYEDJOB--#{job.name}") do | |
block.call(job, *args) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = 'parallel_assets_compiler' | |
s.version = '0.2.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Jørgen Orehøj Erichsen' | |
s.email = 'joe@erichsen.net' | |
s.summary = 'Compile assets in parallel' | |
s.description = 'Compile assets in parallel to speed up deployment' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = 'parallel_assets_compiler' | |
s.version = '0.3' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Jørgen Orehøj Erichsen, Alexander Maslov' | |
s.email = 'joe@erichsen.net, drakmail@gmail.com' | |
s.summary = 'Compile assets in parallel' | |
s.description = 'Compile assets in parallel to speed up deployment' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First, you need to set your GitHub username in global git config: | |
> | |
$ git config --global github.user Username | |
< | |
Then, gist.vim will ask for your password to create an authorization when you |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.perform | |
partner = Partner.find(232570) | |
to_delete = partner.document_checklist_items.reject {|dci| dci.file_attachments.present?} | |
to_delete.each { |dci| partner.document_checklist_items.delete dci } | |
partner.rebuild_document_checklist_items! | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assert that the signature field is empty, with no image | |
page.should_not have_css(".signature_input_field img") | |
page.should_not have_css(".popover") | |
# click the "Click here to sign" link button | |
page.execute_script("$('##{signature_field_id} a').click()"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# Every Vagrant development environment requires a box. You can search for | |
# boxes at https://vagrantcloud.com/search. | |
config.vm.box = "financeit/centah" | |
config.ssh.forward_agent = true |