Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Adrien Poly adrienpoly

💭
I may be slow to respond.
View GitHub Profile
@adrienpoly
adrienpoly / static.js
Last active Oct 20, 2020
accessing static values from a class instance
View static.js
class A extends Controller {
static targets = ["a", "b"]
connect() {
A.targets // -> ["a", "b"]
}
}
export default class extends Controller {
static targets = ["a", "b"]
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Playground - JavaScript 101</title>
<style media="screen">
.red { color: red; }
</style>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
@adrienpoly
adrienpoly / actiontext.md
Created Oct 4, 2018
Step by Step guide to test Rails ActiveText
View actiontext.md

Step by Step guide to test Rails ActiveText

You might have seen the video of DHH about ActionText upcoming feature in Rails 6. This is a step by step guide for creating the exact same example as in the video.

⚠️ If like me you never ran an edge version of Rails before and wonder how to do it then this is for you

Create a new app from the Edge version of Rails

  1. Clone the Rails repo
You can’t perform that action at this time.