Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
#asset_url helper method
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Scott Carleton  
View profile  
 More options Oct 18 2012, 7:44 pm
From: Scott Carleton <carleton.sc...@gmail.com>
Date: Thu, 18 Oct 2012 16:44:06 -0700 (PDT)
Local: Thurs, Oct 18 2012 7:44 pm
Subject: #asset_url helper method

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rafael Mendonça França  
View profile  
 More options Oct 19 2012, 9:29 am
From: Rafael Mendonça França <rafaelmfra...@gmail.com>
Date: Fri, 19 Oct 2012 10:29:10 -0300
Local: Fri, Oct 19 2012 9:29 am
Subject: Re: [Rails-core] #asset_url helper method

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

https://github.com/rails/rails/blob/e826a5c749f9a4029a3b2a7e3d371498f...

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

On Thu, Oct 18, 2012 at 8:44 PM, Scott Carleton <carleton.sc...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Carleton  
View profile  
 More options Oct 29 2012, 3:24 pm
From: Scott Carleton <carleton.sc...@gmail.com>
Date: Mon, 29 Oct 2012 12:24:29 -0700 (PDT)
Local: Mon, Oct 29 2012 3:24 pm
Subject: Re: [Rails-core] #asset_url helper method

I haven't had time to test but you're saying the asset_path helper will
provide the full url by default?  

In console within production environment it seems to only return the path
which isn't sufficient for html emails.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrés Mejía  
View profile  
 More options Oct 30 2012, 12:59 am
From: Andrés Mejía <and...@gmail.com>
Date: Mon, 29 Oct 2012 23:58:53 -0500
Local: Tues, Oct 30 2012 12:58 am
Subject: Re: [Rails-core] #asset_url helper method

If I remember correctly, asset_path will return the full URL if you set

config.action_mailer.asset_host = "http://my.assets.com"

in your environment file.

On Mon, Oct 29, 2012 at 2:24 PM, Scott Carleton <carleton.sc...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »