Skip to content

Commit cf108b8

Browse files
committed
Install stimulus
1 parent 398f85e commit cf108b8

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ gem 'redis', '~> 4.0'
2121
gem 'hotwire-rails'
2222
gem 'importmap-rails'
2323
gem 'turbo-rails'
24+
gem 'stimulus-rails'
2425

2526
# Use Active Storage variant
2627
# gem 'image_processing', '~> 1.2'

Gemfile.lock

+1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ DEPENDENCIES
243243
sass-rails (>= 6)
244244
selenium-webdriver
245245
spring
246+
stimulus-rails
246247
turbo-rails
247248
tzinfo-data
248249
web-console (>= 4.1.0)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Controller } from "stimulus"
2+
3+
export default class extends Controller {
4+
connect() {
5+
this.element.textContent = "Hello World!"
6+
}
7+
}

app/assets/javascripts/importmap.json.erb

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"imports": {
3-
"turbo": "<%= asset_path "turbo" %>",
43
<%= importmap_list_with_stimulus_from(
54
"app/assets/javascripts/models",
65
"app/assets/javascripts/controllers",

0 commit comments

Comments
 (0)