Skip to content

Conversation

Franerial
Copy link
Owner

No description provided.

private

def create_log
[@status, @header, @body]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

какую функцию выполняет этот массив? если его удалить, по не сломается. А код станет не много чище

Parameters: #{@request.params}
Response: #{full_status} \[#{@header["Content-Type"]}\] #{view}
)
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

так как лог файл может быть беконечно большим, то лог каждого запроса лучше писать в 1 строчку

log/app.log Outdated
Handler: TestsController#question
Parameters: {"one"=>"1", :id=>"487", :question_id=>"25"}
Response: 200 OK [text/plain]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше не класть лог файл в репозиторий

def index
@time = Time.now
render "tests/index"
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

согласно REST данный экшен должен отдавать список тестов, а не время

def create
status 201
render plain: "Create method in action!"
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут ведь ни чего не создаётся

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants