module Rack
    class Request
      def subdomains
...

Ruby Personalized URL (Purl) Sub...

by grayfm, January 11, 2010 22:25, 4 refactorings, tagged with url, rack, domain, sinatra, subdomain

So i need to define @purl_b...

41b76a0d9fd81133d545fb2b994013ab Talk
# This method searches a source by  the http, the www and the trailing / to a url
	def self.find_by_url(url)
		Source.find :first, :conditions => [ " url = ? OR url = ? OR url = ? OR url = ? ", url, url.gsub("http://", "http://www"), url + "/", url.gsub("http://", "http://www")+"/"] 
...

Ruby Find a URL in a database

by julien, July 18, 2008 17:16, 3 refactorings, tagged with url, find

Hi!
I've a got a website A...

B30ce50678f0e934eaa6697425c59dd7 Talk