refractor root_path variable and used parameters to render a db sort