# File lib/models.rb, line 51 def update_classes! doc = Nokogiri::HTML(Net::HTTP.get(URI.parse("#{url}/fr_class_index.html"))) doc.css("a").each do |a| constant = self.constants.find_or_create_by_name_and_url(a.text, self.url + "/" + a["href"]) end end