Answer the question
In order to leave comments, you need to log in
But what happens if in Rails all the contents of the controller action are pushed into the service object?
I decided to process the data in the service object.
Here for example:
def index
@todo_service = TodoService.new
@str1 = @service.str1
@str2 = @service.str2
@str3 = @service.str3
end
def index
@todo_service = TodoService.new
end
<div><%= @todo_service.str1 %></div>
......
и так далее
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question