url-for

What is the difference between url_for methods?

I'm wondering what is the difference between these two methods: ActionView::Helpers::UrlHelper.url_for and ActionController::UrlWriter.url_for? ...

Rails: generate a full URL in an ActionMailer view

I'm using ActionMailer to send a sign up confirmation email. The email needs to contain a link back to the site to verify the user, but I can't persuade Rails to generate a full URL (including the domain etc). I'm using: <%= url_for :controller => 'login', :action => 'verify', :guid => @user.new_user.guid, :only_path => false, :host =...

Ruby on Rails: url_for :back leads to NoMethodError for back_url

Hi all, I'm trying to use url_for(:back) to create a redirect leading back to a previous page upon a user's logging in. I've had it working successfully for when the user just goes to the login page on his or her own. However, when the user is redirected to the login page due to accessing a page requiring that the user be authenticated...

class ProfilePresenter < ActionView::Base | url_for doesn't work. why?

class ProfilePresenter < ActionView::Base def initialize super url_for # i got: You have a nil object when you didn't expect it! # The error occurred while evaluating nil.url_for end end url_for doesn't work. why? i make a new instance like this ProfilePresenter.new ...

Why isn't url_for rendering this like I think it should?

I have this in my controller: @statics = [{'home' => 'about'}, {'home' => 'termsandconditions'}, {'home' => 'information'}, {'news' => 'archives'}] and in my view: @statics.each do |controller, action| xml.loc url_for(:only_path => false, :controller => controller, :action => action) xml.lastmo...