class Rur::ThorUltils

Public Instance Methods

prepend_rur_route(route) click to toggle source
# File lib/rur/thor_ultils.rb, line 6
def prepend_rur_route(route)
  route_path = %Q(\n    # Rur for #{route}\n    get '#{route}' => 'high_voltage/pages#show', id: '#{route}')

  insert_into_file(
    "#{Rails.root}/config/routes.rb",
    route_path,
    verbose: false,
    after: /scope \:rur do/
  )
end