-
Laravel:
$request->parameter
-
Rails:
jika menggunakan tag form biasa
params.permit(:nama_parameter)
This file contains hidden or 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 | |
mv spec/dummy/spec/{rails_helper,spec_helper}.rb spec/ |
This file contains hidden or 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/sh | |
yarn add \ | |
imports-loader \ | |
jquery \ | |
datatables.net \ | |
datatables.net-bs4 \ | |
datatables.net-responsive \ | |
datatables.net-responsive-bs4 |
- install rails webpacker 6
- add 'runtime' to javascript_pack_tag in dummy views, without that the entire javascript will not be executed
- [optional] set app source to the engine app packs
This file contains hidden or 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 | |
files_to_watch=$@ | |
file_to_run=$1 | |
inotifywait -e close_write $files_to_watch -m | while read file _event; do bundle exec ruby $file_to_run; done |
This file contains hidden or 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
sudo apt update | |
sudo apt install git zsh | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
sh -c "$(curl -fsSL https://starship.rs/install.sh)" | |
This file contains hidden or 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/zsh | |
# install auto suggestions | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
# install syntax highlighting | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git | |
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc | |
sed -z --regexp-extended 's/(plugins=\(.*)\)/\1\tzsh-autosuggestions\n\tzs-syntax-highlighting\n)/g' ~/.zshrc |
This file contains hidden or 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
import { Controller } from 'stimulus' | |
// used for changing form fields dynamically based on what user want in one page | |
export default class extends Controller { | |
static values = { targetContainerId: String, templateId: String } | |
async connect() { | |
// store array of DocumentFragment by id | |
this.templates = {} | |
// store container elements by id |