##Rails Callback Order of Execution - With and Without state_machines
###Rails Callback Order
- (-) save
- (-) valid
- (1) before_validation
- (-) validate
- (2) after_validation
- (3) before_save
##Rails Callback Order of Execution - With and Without state_machines
###Rails Callback Order
#Instructions for enabling your local machine to use both BitBucket and GitHub
Ok, so you want to configure your machine to use BitBucket. The options are:
The first one is self explanatory, so we will focus on the second one.
If you want to use BitBucket via Terminal, chances are you want to configure SSH, and also are already using GitHub.
#!/bin/bash | |
#This script is tuned to install CouchDB on an Amazon Linux (2015.09) EC2 Instance | |
#Documented here: | |
#https://cwiki.apache.org/confluence/display/COUCHDB/Amazon+Linux | |
#Install tools | |
sudo yum -y --enablerepo=epel groupinstall "Development Tools" | |
sudo yum -y --enablerepo=epel install perl-Test-Harness erlang-erts erlang-os_mon erlang-eunit libicu-devel autoconf-archive curl-devel erlang-etap erlang-asn1 erlang-xmerl js-devel |
When I first started learning to code, I found the concept of callbacks extremely confusing. Which is funny, because I was using them all the time without realising it - If you currently use jQuery
, then you are already using callbacks. (More on this later).
So here's my attempt to try and explain callbacks in as simple a way as I can. I'll probably gloss over some details here, but keep in mind this is a beginner's guide. If you see any glaring errors, feel free to ask me to change it.
So here goes:
##Basic definition: ####A callback is a function that is passed as an argument to another function.