Project

submariner

0.0
No commit activity in last 3 years
No release in over 3 years
Easy wildcard domains in rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.0
 Project Readme

Submariner

Easy wildcard subdomains in rails

Basically this run a block and pass the subdomain to it so you can do interesting things like load a user based on subdomain etc.

Submariner::WildCardSubdomain.config do |config|
  config.subdomains_to_ignore = ["www"] #Don't run the block for these domains
  config.subdomain_block = lambda { |subdomain| Rails.logger.warn "Subdomain block ran for #{subdomain}" } #Do something everytime a domain is detected
end

This project rocks and uses MIT-LICENSE.