diff --git a/app/views/scores/index.html.erb b/app/views/scores/index.html.erb index 8ceb420..15c2fca 100644 --- a/app/views/scores/index.html.erb +++ b/app/views/scores/index.html.erb @@ -4,6 +4,8 @@ ACTION_VIEW = <%=Live::Constants::ACTION_VIEW%>
ACTIVE_RECORD = <%=Live::Constants::ACTIVE_RECORD%>
+<%= Score.first %> +<%= Score.first %>
<%= link_to "New score", new_score_path, class: "border rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> diff --git a/lib/semantic/subscribers/action_controller.rb b/lib/semantic/subscribers/action_controller.rb index bff15c3..2e47ff0 100644 --- a/lib/semantic/subscribers/action_controller.rb +++ b/lib/semantic/subscribers/action_controller.rb @@ -9,7 +9,7 @@ module Semantic TERMINUS_STRING = '╙─╜'.freeze def initialize(session_key) - super() + super(:controller) @session_key = session_key @transactions = {} end diff --git a/lib/semantic/subscribers/action_view.rb b/lib/semantic/subscribers/action_view.rb index 2abae42..6a05b8a 100644 --- a/lib/semantic/subscribers/action_view.rb +++ b/lib/semantic/subscribers/action_view.rb @@ -6,6 +6,8 @@ module Semantic REGEX_BASEDIR = %r{^#{Rails.root}/(.*)} + def initialize = super(:view) + def render_partial(event) identifier = pathname(event.payload[:identifier]) # logger.debug("Rendered partial #{identifier}", event.payload[:locals]) if identifier diff --git a/lib/semantic/subscribers/log_subscriber.rb b/lib/semantic/subscribers/log_subscriber.rb index b4e2096..3a3e472 100644 --- a/lib/semantic/subscribers/log_subscriber.rb +++ b/lib/semantic/subscribers/log_subscriber.rb @@ -4,9 +4,9 @@ module Semantic class LogSubscriber attr_reader :logger, :event_group - def initialize + def initialize(logger_name = nil) @event_group = self.class.name.demodulize.underscore.to_sym - @logger = SemanticLogger[@event_group] + @logger = SemanticLogger[logger_name || @event_group] end def any_hook(event)