Discussion:
[Rails 3.1.0.rc4] Issue with a resource named "asset"
Joel Clark
2011-06-19 14:21:42 UTC
Permalink
Here are the commands:


407 rails new resource_test_2
408 cd resource_test_2/
409 rails g resource asset
410 rake routes

The output:

imac:resource_test_2 joel$ rake routes
imac:resource_test_2 joel$ rails --version
Rails 3.1.0.rc4


On 3.0.9 the resource routes come up, on 3.1.0.rc4 the routes do not.
If you use a name other than asset, rc4 brings up the routes.
--
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-***@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-core+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Ken Collins
2011-06-19 18:29:10 UTC
Permalink
Without looking deeply into this, I would assume that this is related to the asset pipeline and sprockets using that route. I'm not sure if either disabling it in application.rb with "config.assets.enabled = false" and/or a warning is the proper solution, if any.

- Ken
Post by Joel Clark
407 rails new resource_test_2
408 cd resource_test_2/
409 rails g resource asset
410 rake routes
imac:resource_test_2 joel$ rake routes
imac:resource_test_2 joel$ rails --version
Rails 3.1.0.rc4
On 3.0.9 the resource routes come up, on 3.1.0.rc4 the routes do not.
If you use a name other than asset, rc4 brings up the routes.
--
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-***@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-core+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Joel Moss
2011-06-19 19:45:00 UTC
Permalink
Seems that introducing a way to rename the asset pipeline route would be a needed option, that would fix issues such as this.

--
Joel Moss

Develop with Style at http://DevelopWithStyle.com
Really useful software project management: http://Codaset.com
===================================
Call me +44 7791 503309
http://twitter.com/joelmoss
AIM: joelkmoss
MSIM: ***@joelmoss.info
Skype: joelmoss.info
Post by Ken Collins
Without looking deeply into this, I would assume that this is related to the asset pipeline and sprockets using that route. I'm not sure if either disabling it in application.rb with "config.assets.enabled = false" and/or a warning is the proper solution, if any.
- Ken
407 rails new resource_test_2
408 cd resource_test_2/
409 rails g resource asset
410 rake routes
imac:resource_test_2 joel$ rake routes
imac:resource_test_2 joel$ rails --version
Rails 3.1.0.rc4
On 3.0.9 the resource routes come up, on 3.1.0.rc4 the routes do not.
If you use a name other than asset, rc4 brings up the routes.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
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 rubyonrails-***@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-core+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Guillermo Iguaran
2011-06-19 19:51:33 UTC
Permalink
You can do it with config.assets.prefix = "/something"
--
Guillermo Iguaran
Sent with Sparrow (http://www.sparrowmailapp.com)
Post by Joel Moss
Seems that introducing a way to rename the asset pipeline route would be a needed option, that would fix issues such as this.
--
Joel Moss
Develop with Style at http://DevelopWithStyle.com
Really useful software project management: http://Codaset.com
===================================
Call me +44 7791 503309
http://twitter.com/joelmoss
AIM: joelkmoss
Skype: joelmoss.info (http://joelmoss.info)
Post by Ken Collins
Without looking deeply into this, I would assume that this is related to the asset pipeline and sprockets using that route. I'm not sure if either disabling it in application.rb with "config.assets.enabled = false" and/or a warning is the proper solution, if any.
- Ken
407 rails new resource_test_2
408 cd resource_test_2/
409 rails g resource asset
410 rake routes
imac:resource_test_2 joel$ rake routes
imac:resource_test_2 joel$ rails --version
Rails 3.1.0.rc4
On 3.0.9 the resource routes come up, on 3.1.0.rc4 the routes do not.
If you use a name other than asset, rc4 brings up the routes.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
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.
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 rubyonrails-***@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-core+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Ryan Bigg
2011-06-19 20:34:45 UTC
Permalink
Pipped to the post!

Nice work Guilermo!
You can do it with config.assets.prefix = "/something"
--
Guillermo Iguaran
Sent with Sparrow
Post by Joel Moss
Seems that introducing a way to rename the asset pipeline route would be a needed option, that would fix issues such as this.
--
Joel Moss
Develop with Style at http://DevelopWithStyle.com
Really useful software project management: http://Codaset.com
===================================
Call me +44 7791 503309
http://twitter.com/joelmoss
AIM: joelkmoss
Skype: joelmoss.info
Post by Ken Collins
Without looking deeply into this, I would assume that this is related to the asset pipeline and sprockets using that route. I'm not sure if either disabling it in application.rb with "config.assets.enabled = false" and/or a warning is the proper solution, if any.
- Ken
407 rails new resource_test_2
408 cd resource_test_2/
409 rails g resource asset
410 rake routes
imac:resource_test_2 joel$ rake routes
imac:resource_test_2 joel$ rails --version
Rails 3.1.0.rc4
On 3.0.9 the resource routes come up, on 3.1.0.rc4 the routes do not.
If you use a name other than asset, rc4 brings up the routes.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
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.
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.
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 rubyonrails-***@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-core+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Loading...