<commit_before>module RoutesHelper
	module Base

		def path_names
			@path_names ||= Rails.application.routes.routes.anchored_routes.collect { |route| route.name }.compact
		end

		def paths
			@paths ||= routes_array.collect { |route| route[2] }
		end

		def current_path_with_parameter_names
			if current_path.match(/\A\/users\/(\d)+\z/)
				"/users/:id"
			elsif current_path.match(/\A\/admin\/users\/(\d)+\/edit\z/)
				"/admin/users/:id/edit"
			else
				current_path
			end

		end

		def current_path_name
			@current_path_name ||= path_method_path_name_hash[current_path_with_parameter_names][current_request_method]
		end

		def current_action
			@current_action ||= "#{current_action_hash[:controller]}##{current_action_hash[:action]}"
		end

		def current_route_set
			@current_route_set || Rails.application.routes
		end

		def current_request_path
			@current_request_path = current_env["REQUEST_PATH"]
		end

		def current_path
			@current_path ||= current_env["PATH_INFO"]
		end

		def current_request_method
			@current_request_method ||= current_env["REQUEST_METHOD"]
		end

		def current_action_hash
			@current_action_hash ||= current_route_set.recognize_path(current_path)
		end

	end
end<commit_msg>expanded RoutesHelper#current_path_with_parameter_name to include case for user poems<commit_after>module RoutesHelper
	module Base

		def path_names
			@path_names ||= Rails.application.routes.routes.anchored_routes.collect { |route| route.name }.compact
		end

		def paths
			@paths ||= routes_array.collect { |route| route[2] }
		end

		def current_path_with_parameter_names
			if current_path.match(/\A\/users\/(\d)+\z/)
				"/users/:id"
			elsif current_path.match(/\A\/admin\/users\/(\d)+\/edit\z/)
				"/admin/users/:id/edit"
			elsif current_path.match(/\A\/users\/(\d)+\/poems\z/)
				"/users/:user_id/poems"
			else
				current_path
			end

		end

		def current_path_name
			@current_path_name ||= path_method_path_name_hash[current_path_with_parameter_names][current_request_method]
		end

		def current_action
			@current_action ||= "#{current_action_hash[:controller]}##{current_action_hash[:action]}"
		end

		def current_route_set
			@current_route_set || Rails.application.routes
		end

		def current_request_path
			@current_request_path = current_env["REQUEST_PATH"]
		end

		def current_path
			@current_path ||= current_env["PATH_INFO"]
		end

		def current_request_method
			@current_request_method ||= current_env["REQUEST_METHOD"]
		end

		def current_action_hash
			@current_action_hash ||= current_route_set.recognize_path(current_path)
		end

	end
end
{'fraction_non_alphanumeric': 0.11397766653831344, 'fraction_numerical': 0.0007701193685021178, 'mean_word_length': 4.37888198757764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1862192', 'n_tokens_mistral': 1017, 'n_tokens_neox': 879, 'n_words': 145}