module

ActionController::UrlWriter

rails latest stable

Module deprecated or moved

This module is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

No documentation available for this module.

Included modules

  • Rails

Files

  • actionpack/lib/action_controller/deprecated/url_writer.rb

2Notes

Accessing URL helpers in Rails 3

elizabrock · Jan 6, 20112 thanks

I've been upgradings an app to Rails 3 and it took me a bit to find this-

If you were using

include ActionController::UrlWriter

to get the url helpers in rails 2, you should switch to

include Rails.application.routes.url_helpers 

for Rails 3

From: http://snipplr.com/view/37063/to-access-url-helpers-urlfor-etc-from-rails-console-rails-3/

How to deal with Missing host to link to!

stevo · Mar 2, 2011

You just need to define default_url_options[:host] in your class. The easiest way to do it:

class SomeClass include ActionController::UrlWriter default_url_options[:host] = YourApp::Application.config.action_mailer.default_url_options[:host]

def some_method

some_superb_url(maybe_even_some_variable_here) end end