diff --git a/app/models/medium.rb b/app/models/medium.rb index 3c1a93b94..124395eac 100644 --- a/app/models/medium.rb +++ b/app/models/medium.rb @@ -286,11 +286,12 @@ def self.search_by(search_params, page) # generic media sorts as results even if the 'all' radio button # is seleted if search_params[:all_types] == '1' - search_params[:types] = if search_params[:from] == 'start' - Medium.generic_sorts - else - [] - end + search_params[:types] = + if search_params[:from] == 'start' + Medium.generic_sorts + else + [] + end end search_params[:teachable_ids] = TeachableParser.new(search_params) .teachables_as_strings