subdomainitis 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/subdomainitis.rb +6 -0
  2. metadata +2 -2
data/lib/subdomainitis.rb CHANGED
@@ -118,6 +118,12 @@ module Subdomainitis
118
118
  def host_name(subdomain_parameter, host)
119
119
  raise HostRequired.new unless host
120
120
  index = -1 - tld_length
121
+ subdomain_parameter = if subdomain_parameter.respond_to?(:to_param)
122
+ subdomain_parameter.to_param
123
+ else
124
+ subdomain_parameter
125
+ end
126
+
121
127
  ([subdomain_parameter] + host.split(".")[index..-1]).join(".")
122
128
  end
123
129
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 1
9
- version: 0.9.1
8
+ - 2
9
+ version: 0.9.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Stephen Judkins