ViewComponent / demo

Rails application with ViewComponent
MIT License
157 stars 15 forks source link

Route helpers need a host set in default_url_options to use a *_url method #26

Closed dark-panda closed 5 years ago

dark-panda commented 5 years ago

The following exception occurs when trying to use a *_url-style route helper:

ArgumentError - Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true:

This occurs when the Rails.application.routes.url_helpers has been included in a component and you try to use any sort of *_url method, like root_url or similar.

dark-panda commented 5 years ago

Meant to put this in the main repo. :/