Erector views – undefined method `default_url_options’

I’m posting this because it took me too long to figure this out. Hope it saves someone else some trouble. If you want to use named route helpers to generate urls in your erector widgets you need to include ActionController::UrlWriter in your class, like so:


class Views::Layouts::BasicPage < Erector::Widgets::Page
include ActionController::UrlWriter
...
end

This entry was posted in Web and tagged . Bookmark the permalink.
  • Ralf Nieuwenhuijsen

    You just saved my day!
    Thanks :-)

  • http://silverpond.com.au kirill

    I owe you a beer