lib/generators/templates/view.haml.erb in amber_component-1.0.0 vs lib/generators/templates/view.haml.erb in amber_component-1.1.0
- old
+ new
@@ -1,9 +1,13 @@
-.<%= singular_table_name %>
+.<%= 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