Skip to content
This repository was archived by the owner on Mar 7, 2018. It is now read-only.

Commit 8ad8097

Browse files
zsalzbankpushmatrix
authored andcommitted
allow send_event to be called from within modules
resolves the error: undefined local variable or method `settings' when send_event is called from in a module
1 parent 50c8638 commit 8ad8097

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/dashing.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ def send_event(id, body)
9292
body[:id] = id
9393
body[:updatedAt] ||= Time.now.to_i
9494
event = format_event(body.to_json)
95-
settings.history[id] = event
96-
settings.connections.each { |out| out << event }
95+
Sinatra::Application.settings.history[id] = event
96+
Sinatra::Application.settings.connections.each { |out| out << event }
9797
end
9898

9999
def format_event(body)

0 commit comments

Comments
 (0)