Displaying 1 result from an estimated 1 matches for "cached_domain".
2011 Apr 21
1
Rails 3 Foreign Domain routing - cannot get this to work!
...''/'' do
root :to => "projects#show"
resource :project
end
end
root :to => "home#index"
[/code]
in my model I have:
[code]
# app/models/project.rb
before_validation :cache_domain
validates_uniqueness_of :subdomain,
:cached_domain
validates_uniqueness_of :cname_alias,
:allow_blank => true
validates_presence_of :subdomain,
:cached_domain
validates_exclusion_of :subdomain,
:in => %w(admin blog),
:message => "is ta...