Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemanrubia committed Dec 5, 2024
1 parent 839b1a4 commit e91a124
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/hotwire_spark.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/hotwire_spark/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def monitor_paths

def monitor(paths_name, action:)
file_watcher.monitor HotwireSpark.public_send(paths_name) do |file_path|
ActionCable.server.broadcast "hotwire_spark", change_message_for(action, file_path)
ActionCable.server.broadcast "hotwire_spark", reload_message_for(action, file_path)
end
end

def file_watcher
@file_watches ||= HotwireSpark::FileWatcher.new
end

def change_message_for(action, file_path)
def reload_message_for(action, file_path)
{ action: action, path: file_path }
end
end

0 comments on commit e91a124

Please sign in to comment.