app/controllers/data_objects_controller.rb
def options_for_group_by(group_type)
    return [] if group_type == "departments"
    @options = current_department.send(group_type)
    @options.map{|t| [t.name, t.id]}.sort
  end
#These three options could maybe be refactored into helper methods -ben
These three options could maybe be refactored into helper methods -ben
These three options could maybe be refactored into helper methods - ben
def options_for_group_by(group_type)
    return [] if group_type == "departments"
    @options = current_department.send(group_type)
    @options.map{|t| [t.name, t.id]}.sort
  end
def options_for_group_by ( group_type ) return [ ] if group_type == "departments" @options = current_department . send ( group_type ) @options . map { | t | [ t . name , t . id ] } . sort end
These three options could maybe be refactored into helper methods -ben
These three options could maybe be refactored into helper methods - ben
group_type