app/controllers/data_objects_controller.rb
def options_for_group_type
    options = [["Location","locations"],["Location Group","loc_groups"]]
    if current_user.is_admin_of?(current_department)
      options.push(["Data type", "data_types"], ["Department", "departments"]).sort
    end
    options
  end
#These three options could maybe be refactored into helper methods -ben
#This would require also refactoring the @selected_type & @selected_by vars
These three options could maybe be refactored into helper methods -ben
This would require also refactoring the @selected_type & @selected_by vars
These three options could maybe be refactored into helper methods - ben This would require also refactoring the @selected_type & @selected_by vars
def options_for_group_type
    options = [["Location","locations"],["Location Group","loc_groups"]]
    if current_user.is_admin_of?(current_department)
      options.push(["Data type", "data_types"], ["Department", "departments"]).sort
    end
    options
  end
def options_for_group_type options = [ [ "Location" , "locations" ] , [ "Location Group" , "loc_groups" ] ] if current_user . is_admin_of? ( current_department ) options . push ( [ "Data type" , "data_types" ] , [ "Department" , "departments" ] ) . sort end options end
These three options could maybe be refactored into helper methods -ben
This would require also refactoring the @selected_type & @selected_by vars
These three options could maybe be refactored into helper methods - ben This would require also refactoring the @selected_type & @selected_by vars