late-king-9468
08/25/2022, 1:13 PMold_search_query
and new_search_query
variables inside the method definition
- Navigate to the app/avo/resources
folder to launch the script (running it from root with the full path did not work)
Maybe worth updating for future users ?lemon-wall-20836
08/25/2022, 1:14 PMlemon-wall-20836
08/25/2022, 1:14 PMloud-jewelry-99127
08/25/2022, 8:41 PMDONT_TOUCH = ['.', '..', $0]
OLD_SEARCH_QUERY = "self.search_query = ->(params:) do"
NEW_SEARCH_QUERY = "self.search_query = -> do"
def remove_params_keyword(file_name)
content = File.read file_name
content.gsub!(OLD_SEARCH_QUERY, NEW_SEARCH_QUERY)
File.open(file_name, "w") { |file| file << content }
end
Dir.foreach(".") {|file_name| remove_params_keyword file_name unless DONT_TOUCH.include? file_name}
meanwhile we'll update the documentation as well, thanks for the report!