This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Based on example of http://gist.github.com/276455 but change to not use nokogiri but Activeresource | |
| # define file in model directory | |
| class Sixpp < ActiveResource::Base | |
| class << self | |
| # 6pp returns a xml where first item is hash. We need to enter hash["item"] and then check if there is 1 or more records. | |
| def instantiate_collection(collection, prefix_options = {}) | |
| unless collection["item"].kind_of? Array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'net/dns/resolver' | |
| # Custom Domain | |
| # | |
| # Require net-dns gem | |
| # | |
| # A Rack middleware to to resolve the custom domain to original subdomain | |
| # for your multi telent application. | |
| # | |
| # It's all transperant to your application, it performs cname lookup and |