module SvelteOnRails::Installer::Utils
def self.which_root_route
def self.which_root_route # Check if the root route is active (uncommented) or commented out routes = File.read(Rails.root.join('config', 'routes.rb')) m = routes.match(/^\s*root\s+['"]([^'"]+)['"]/m) if m m.to_s.match(/^\s*root\s*['"]([^'"]*)['"]/)[1] end end