If asset_host is set as a 2 arguement Proc, asset tag helpers will fall over at compute_asset_host when called from mailer views because Mailers do not have access to a request object. I''ve created a small patch that modifies compute_asset_host to return nil in place of a request object if it''s not present: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1394-compute_asset_host-bombs-when-asset_host-proc-and-called-from-a-mailer This way, if your using asset tag helpers in your mailer views, you can write your Proc to deal with nil requests and all is well! Tekin Suleyman --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve added a patch with some tests to highlight an issue with asset_host and ActionMailer: rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1394- compute_asset_host-bombs-when-asset_host-proc-and-called-from-a-mailer There''s also a patch to fix this problem. I have a question: Does anyone use the request argument in their Proc for anything other than checking for SSL? Looking back at the original ticket, that was the primary reason for the change: http://dev.rubyonrails.org/ticket/10549 Would it make sense to add ssl_asset_host to ActionController::Base and depreciate two argument Proc''s? I''m happy to work up a patch for this, just wanted to make sure I''m not missing a use case for the request argument. Tekin Suleyman --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> I have a question: Does anyone use the request argument in their Proc > for anything other than checking for SSL? Looking back at the original > ticket, that was the primary reason for the change:Yes. We use it to check the user agent among other things. So that can''t go. I thought I saw someone having another solution to the Action Mailer issue? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> > I thought I saw someone having another solution to the Action Mailer > issue? >Don''t know, I didn''t spot anything in Lighthouse when I looked. Might have been me as did I posted here last week with a patch but no tests. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---