Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Adrien Poly adrienpoly

I may be slow to respond.
View GitHub Profile
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>
<meta charset="UTF-8">
<title>Playground - JavaScript 101</title>
<style media="screen">
.red { color: red; }
<link rel="stylesheet"
adrienpoly /
Created Oct 4, 2018
Step by Step guide to test Rails ActiveText

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.