E
E
eldar_web2018-03-09 12:18:05
Ruby on Rails
eldar_web, 2018-03-09 12:18:05

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

What happens if you write like this:
def index
@todo_service  = TodoService.new
end

And in view use:
<div><%= @todo_service.str1 %></div>
......
и так далее

???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artur Bordenyuk, 2018-03-09
@HighQuality

Everything will be the same as it was before

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question