Rails の remote: true
な form (など?) で JS を返すパターン案2。案1 よりもシンプル。
考えた事:
- form の送信前後で JS を走らせたい場合、送信前の処理は assets 内の JS で、送信後の処理は views 内の JS で書くといった分断が起きうる。 関連するコードは近くに置きたい。
- webpack の transpile 対象にしたい。
- HTML の動的作成は JS ではなく Rails のパーシャルを使うように統一するのが良さそう。
{ | |
"title": "Custom US", | |
"description": "Improve US / Use JIS as US", | |
"rules": [ | |
{ | |
"description": "[US] Fn keys for eisuu/kana", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "f20", |
Rails の remote: true
な form (など?) で JS を返すパターン案2。案1 よりもシンプル。
考えた事:
Rails の remote: true
な form (など?) で JS を返すパターン案1。 views 内に JS を置くだけだと以下のような問題があるので、
webpack 管理の JS を返してみる。方法は単純に webpack の JS を読む script タグを追加するだけ。値の受け渡しにもその script を使う。
{ | |
"keymaps": { | |
"0": { "type": "scroll.home" }, | |
":": { "type": "command.show" }, | |
"o": { "type": "command.show.open", "alter": false }, | |
"O": { "type": "command.show.open", "alter": true }, | |
"tt": { "type": "command.show.tabopen", "alter": false }, | |
"T": { "type": "command.show.tabopen", "alter": true }, | |
"w": { "type": "command.show.winopen", "alter": false }, | |
"W": { "type": "command.show.winopen", "alter": true }, |
{"lastUpload":"2019-12-23T12:17:52.993Z","extensionVersion":"v3.4.3"} |
// - Actor にメッセージを投げたい。 | |
// - Addr を差し替えられるようにしたい。 | |
// - Recepient を使っても良いかも。 | |
use super::hub::Hub; | |
use super::msg; | |
use super::prelude::*; | |
use super::tmpl; | |
use actix::prelude::*; | |
use actix_web::{ |
# require 'tempfile' | |
require 'mini_magick' | |
require 'google/cloud/storage' | |
require 'marcel' | |
storage = Google::Cloud::Storage.new( | |
project_id: 'hello-gcp2', | |
credentials: 'gcp-cred.json', | |
) |
{ | |
"title": "Swap @,` and ',\"", | |
"rules": [ | |
{ | |
"description": "@ to single quote", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "open_bracket", |
rails new \ | |
--skip-action-mailer \ | |
--skip-action-cable \ | |
--skip-sprockets \ | |
--skip-javascript \ | |
--skip-turbolinks \ | |
your_app_name |
ext { | |
defaultEncoding = 'UTF-8' | |
} | |
apply { | |
plugin 'java' | |
} | |
repositories { | |
mavenLocal() |