summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-02-24 21:28:27 -0600
committerHombreLaser <sebastian-440@live.com>2023-02-24 21:28:27 -0600
commit81ad272e12d75d0268163ec5881b47d24affa540 (patch)
tree9af4ffa91f54afeded9eb43dec4aff1c6c5c9c8f
parentea087f5bdc183b9c773979b795e366cc268aadaa (diff)
Refactorizar declaraciĆ³n de logic
-rw-r--r--app/controllers/application_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index b8c3f46..49609c0 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -2,7 +2,7 @@
# The father class of all controllers.
class ApplicationController < ActionController::API
- def logic
- Object.const_get("#{self.class}::#{action_name.camelize}Logic")
+ def logic(permitted_params)
+ @logic ||= Object.const_get("#{self.class}::#{action_name.camelize}Logic").new(permitted_params)
end
end