Skip to content

Commit

Permalink
Fix heart button.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 15, 2024
1 parent cca791c commit f675161
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/game-of-life/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def randomize
end
end

def love(number_of_points: 128, scale: 0.95)
def heart(number_of_points: 128, scale: 0.95)
dt = (2.0 * Math::PI) / number_of_points
t = 0.0

Expand Down Expand Up @@ -218,8 +218,8 @@ def handle(event)
when 'randomize'
self.randomize
self.update!
when 'love'
self.love
when 'heart'
self.heart
self.update!
end
end
Expand Down Expand Up @@ -250,8 +250,8 @@ def render(builder)
builder.text("Randomize")
end

builder.tag('button', onclick: forward_event(action: 'ruby')) do
builder.text("Ruby")
builder.tag('button', onclick: forward_event(action: 'heart')) do
builder.text("Heart")
end
end

Expand Down

0 comments on commit f675161

Please sign in to comment.