I think this is how all the assets helpers work by default.

https://github.com/rails/rails/blob/e826a5c749f9a4029a3b2a7e3d371498feeb9b10/actionpack/lib/action_view/asset_paths.rb#L108

Rafael Mendonça França
http://twitter.com/rafaelfranca
https://github.com/rafaelfranca



On Thu, Oct 18, 2012 at 8:44 PM, Scott Carleton <[email protected]>wrote:

> Just putting this out there before I make a pull request.
>
> Is there any interest in an asset_url method as a view helper?
>
> It would work by using the config.action_controller.asset_host if it
> exists and prepending this to the results of asset_path.
>
> I have found this necessary when writing html emails and needing a full
> url path for assets.  Since my CDN in the asset_host mirrors my assets in
> my app it makes perfect sense.  Might not be a common enough use case to
> put into core though.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-core/-/itwdyjwfSJIJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to