Commit cb405aa4 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Refactor max_size method in update pages service

As per review feedback
parent a4ec232946bb
......@@ -130,9 +130,11 @@ def blocks
def max_size
current_application_settings.max_pages_size.megabytes.tap do |maximum|
return MAX_SIZE if || maximum > MAX_SIZE
max_pages_size = current_application_settings.max_pages_size.megabytes
return MAX_SIZE if
[max_pages_size, MAX_SIZE].min
def tmp_path
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment