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
module Validators | |
class Bank | |
def initialize(agency, account) | |
@agency = agency | |
@account = account | |
end | |
def banco_do_brasil | |
agency = @agency.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
with_options if: :is_step_new do | |
validates :name, :email, :phone, presence: true | |
validates_format_of :email, with: /@/, allow_blank: true | |
end | |
def is_step_new | |
# is_step('new') | |
false | |
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
#!/bin/bash | |
# Every time you run this command the content will be append to .gitignore file. | |
# Usage: | |
# git ignore Drupal | |
# git ignore Global/OSX | |
# git ignore CakePHP | |
if [ "$#" != "1" ]; then | |
echo "Usage: git ignore path from http://github.com/github/gitignore" |
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
$belongsTo = array( | |
'Atendimento' => array( | |
'className' => 'User', | |
'conditions' => array('type' => 'atendimento') | |
), | |
'Criacao' => array( | |
'className' => 'User', | |
'conditions' => array('type' => 'criacao') | |
), | |
); |
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
#!/bin/bash | |
# Eq: git export-diff deploy.tar v1.2.3 HEAD | |
if [ "$#" != "3" ]; then | |
echo "Usage: git export-diff filename.tar ref1 ref2" | |
exit 2; | |
fi | |
filename=$1 | |
ref1=$2 |