PostgreSQL Type | PostgreSQL Size | Description | Range | Diesel Type | Rust Type |
---|---|---|---|---|---|
Nullable Types | nullable | Nullable `` |
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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
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
# after the virtual disk has already been expanded (e.g. in proxmox) | |
apk add --no-cache cfdisk e2fsprogs-extra | |
# choose partition then "Resize" > "Write" (to finalize) | |
cfdisk | |
# replace * with partition you are resizing | |
resize2fs /dev/* |
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
# https://github.com/messense/homebrew-macos-cross-toolchains | |
brew tap messense/macos-cross-toolchains | |
brew install x86_64-unknown-linux-gnu | |
export CC_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-gcc | |
export CXX_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-g++ | |
export AR_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-ar | |
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc |