lib/generators/templates/view.slim.erb in amber_component-1.0.0 vs lib/generators/templates/view.slim.erb in amber_component-1.1.0
- old
+ new
@@ -1,6 +1,10 @@
-div.<%= singular_table_name %>
+div.<%= singular_table_name %><%= %( data-controller="#{stimulus_controller_id}") if stimulus? %>
h1
| Hello from
b <%= class_name %>
| , initialized at: #{@time}
+ <%- if stimulus? %>
+ button data-action="click-><%= stimulus_controller_id %>#greet"
+ | Greet me
+ <% end %>
p = description