From 82dba15e52edf1a85cb4ff11db02f6e8799c3cf2 Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Fri, 17 May 2024 15:42:09 -0600 Subject: [PATCH] Cleanup --- lib/turbo_boost/commands/engine.rb | 1 - lib/turbo_boost/commands/runner.rb | 5 ----- test/dummy/config/initializers/turbo_boost.rb | 1 - 3 files changed, 7 deletions(-) diff --git a/lib/turbo_boost/commands/engine.rb b/lib/turbo_boost/commands/engine.rb index d26d7e6c..f1f79e1e 100644 --- a/lib/turbo_boost/commands/engine.rb +++ b/lib/turbo_boost/commands/engine.rb @@ -24,7 +24,6 @@ class Engine < ::Rails::Engine config.turbo_boost_commands = ActiveSupport::OrderedOptions.new config.turbo_boost_commands[:alert_on_abort] = false # (true, false, "development", "test", "production") config.turbo_boost_commands[:alert_on_error] = false # (true, false, "development", "test", "production") - config.turbo_boost_commands[:cache_element_attributes] = true # (true, false) config.turbo_boost_commands[:precompile_assets] = true # (true, false) config.turbo_boost_commands[:raise_on_invalid_command] = "development" # (true, false, "development", "test", "production") config.turbo_boost_commands[:resolve_state] = false # (true, false) diff --git a/lib/turbo_boost/commands/runner.rb b/lib/turbo_boost/commands/runner.rb index 9191a5fa..03868b04 100644 --- a/lib/turbo_boost/commands/runner.rb +++ b/lib/turbo_boost/commands/runner.rb @@ -110,7 +110,6 @@ def run return if command_performed? command_instance.perform_with_callbacks command_method_name - # command_instance.update_element_attribute_cache if cache_element_attributes? rescue => error @command_errored = true prevent_controller_action error: error if command_requested? @@ -209,10 +208,6 @@ def raise_on_invalid_command? false end - def cache_element_attributes? - TurboBoost::Commands.config.cache_element_attributes && command_succeeded? - end - def redirect? return false if controller.request.get? controller.request.accepts.include? Mime::Type.lookup_by_extension(:turbo_stream) diff --git a/test/dummy/config/initializers/turbo_boost.rb b/test/dummy/config/initializers/turbo_boost.rb index 71aeea69..79ce9fb9 100644 --- a/test/dummy/config/initializers/turbo_boost.rb +++ b/test/dummy/config/initializers/turbo_boost.rb @@ -12,7 +12,6 @@ # Options: # - alert_on_abort, opt-(in/out) of alerting on abort (true, *false, "development", "test", "production") # - alert_on_error, opt-(in/out) of alerting on error (true, *false, "development", "test", "production") -# - cache_element_attributes, opt-(in/out) of caching element attributes (*true, false) # - precompile_assets, opt-(in/out) of precompiling assets (*true, false) # - raise_on_invalid_command, opt-(in/out) of raising an error if invalid command requested (true, false, *"development", "test", "production") # - resolve_state, opt-(in/out) of state resolution (true, *false)