From b684390baa8c52acce5dab5009998f2431ac5872 Mon Sep 17 00:00:00 2001 From: Nao Yanagisawa Date: Sun, 1 Jan 2017 00:46:11 +0900 Subject: [PATCH 1/4] Update README.md about around_action --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7fce1cd..a04ab33 100644 --- a/README.md +++ b/README.md @@ -93,11 +93,11 @@ Hypernova.configure do |config| end ``` -In your controller, you‘ll need an `:around_filter` so you can opt into Hypernova rendering of view partials. +In your controller, you‘ll need an `:around_action` so you can opt into Hypernova rendering of view partials. ```ruby class SampleController < ApplicationController - around_filter :hypernova_render_support + around_action :hypernova_render_support end ``` From daf02bf768d4da668b95948f5c127d95cdc7d5b2 Mon Sep 17 00:00:00 2001 From: Nao Yanagisawa Date: Sun, 1 Jan 2017 00:47:57 +0900 Subject: [PATCH 2/4] Update example with around_action from around_filter --- examples/simple/app/controllers/welcome_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/simple/app/controllers/welcome_controller.rb b/examples/simple/app/controllers/welcome_controller.rb index aecbdb3..598f514 100644 --- a/examples/simple/app/controllers/welcome_controller.rb +++ b/examples/simple/app/controllers/welcome_controller.rb @@ -1,5 +1,5 @@ class WelcomeController < ApplicationController - around_filter :hypernova_render_support + around_action :hypernova_render_support def index end end From abb8947d1279beeb7223ec111192438fcac6c1f8 Mon Sep 17 00:00:00 2001 From: Nao Yanagisawa Date: Sun, 1 Jan 2017 01:35:45 +0900 Subject: [PATCH 3/4] Fix lint error unnecessary escape character in src/index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 012f979..6807f74 100644 --- a/src/index.js +++ b/src/index.js @@ -42,7 +42,7 @@ function decode(res) { } function makeValidDataAttribute(attr, value) { - const encodedAttr = attr.toLowerCase().replace(/[^0-9a-z_\-]/g, ''); + const encodedAttr = attr.toLowerCase().replace(/[^0-9a-z_-]/g, ''); const encodedValue = value.replace(/&/g, '&').replace(/"/g, '"'); return `data-${encodedAttr}="${encodedValue}"`; } From 167d249e8432b6596db49a091ebc2273f331d981 Mon Sep 17 00:00:00 2001 From: Nao Yanagisawa Date: Sun, 1 Jan 2017 05:00:50 +0900 Subject: [PATCH 4/4] Update README for supoprt < 4.0.2 rails user --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a04ab33..7e52384 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ class SampleController < ApplicationController around_action :hypernova_render_support end ``` +Use `:around_filter` instead of `:around_action` if you using version 3.2.13 or older. And then in your view we `render_react_component`.