Since my last proposal was so roundly applauded... Today, Rails templates all use the filename extensions of their target files - a template that will become an .rb file ends in .rb. But they''re not .rb files; they''re .erb files. They are not necessarily valid Ruby. And this conflicts with a wonderful Eclipse feature (supported by Aptana RadRails/RDT) where files with syntax errors - and all parent folders of those files - have their icons decorated with a red "x" so you can see if something in your project is broken. Since all my projects use edge rails in vendor/rails, all my projects appear to be broken all the time. How would folks feel about a patch that (a) changes the generator to allow (but not require) template files ending in .rb.erb, .txt.erb, etc., and (b) changes the built-in Rails generators to use .erb? Rails 2.0 is already doing a mass rename of view files, so this would fit right in; it wouldn''t affect those of you using TextMate, and it shouldn''t break backward compatibility for any custom generators either. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> > How would folks feel about a patch that (a) changes the generator to > allow (but not require) template files ending in .rb.erb, .txt.erb, > etc., and (b) changes the built-in Rails generators to use .erb? > Rails 2.0 is already doing a mass rename of view files, so this would > fit right in; it wouldn''t affect those of you using TextMate, and it > shouldn''t break backward compatibility for any custom generators > either. >I am confused - isn''t this already the case? Generated files all end in .html.erb http://dev.rubyonrails.org/changeset/6690 --~--~---------~--~----~------------~-------~--~----~ 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 am confused - isn''t this already the case? Generated files all end > in .html.erb > > http://dev.rubyonrails.org/changeset/6690 >Oh, I see what you mean now, I really was confused. The templates used to generate those files - not the view files themselves. Nevermind... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 8/31/07, Jay Levitt <jay@jay.fm> wrote:> > Since my last proposal was so roundly applauded... > > Today, Rails templates all use the filename extensions of their target > files - a template that will become an .rb file ends in .rb. > > But they''re not .rb files; they''re .erb files. They are not > necessarily valid Ruby. And this conflicts with a wonderful Eclipse > feature (supported by Aptana RadRails/RDT) where files with syntax > errors - and all parent folders of those files - have their icons > decorated with a red "x" so you can see if something in your project > is broken. Since all my projects use edge rails in vendor/rails, all > my projects appear to be broken all the time. > > How would folks feel about a patch that (a) changes the generator to > allow (but not require) template files ending in .rb.erb, .txt.erb, > etc., and (b) changes the built-in Rails generators to use .erb? > Rails 2.0 is already doing a mass rename of view files, so this would > fit right in; it wouldn''t affect those of you using TextMate, and it > shouldn''t break backward compatibility for any custom generators > either.+1 The template files also cause rdoc to choke and die when you run it on railties. Having them end in .erb would eliminate that problem as well. V/r Anthony -- Cell: 808 782-5046 Current Location: Atlanta, GA --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---