jumph4x/canonical-rails — pull request #7 by jhawthorn (2014-03-09 03:42:13+00:00)
Title: Allow host to be passed to canonical_href or canonical_tag

Hi Dennis. I enjoyed your talk at spreeconf, sorry I didn't get a chance to say hi afterwards.

This commit allows specifying the host when calling `canonical_href` or `canonical_tag`.

I made this to fix a spree issue. The canonical_rails initializer [specifically this line](https://github.com/spree/spree/blob/master/frontend/config/initializers/canonical_rails.rb#L5) is run at startup and accesses Spree::Config, which in turn accesses the database (see spree/spree#3833). We'll also need this ability as we add some (basic) multitenancy support into spree core.

Thanks