Is there a generator that can rename a controller? I don''t want to have to manually change all of the files that are associated with the controller. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Boop Boop wrote:> Is there a generator that can rename a controller? I don''t want to have > to manually change all of the files that are associated with the > controller.No. Search and replace the name, then run all your unit tests. Don''t integrate (commit to Subversion) until they all pass. Such a generator would be impossible, because it would have to parse Ruby on the fly, and _then_ do everything your unit tests do. -- Phlip http://www.oreilly.com/catalog/9780596510657/ "Test Driven Ajax (on Rails)" assert_xpath, assert_javascript, & assert_ajax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 9-Jul-07, at 9:47 PM, Phlip wrote:> > Boop Boop wrote: > >> Is there a generator that can rename a controller? I don''t want to >> have >> to manually change all of the files that are associated with the >> controller. > > No. Search and replace the name, then run all your unit tests. Don''t > integrate (commit to Subversion) until they all pass. > > Such a generator would be impossible, because it would have to > parse Ruby on > the fly, and _then_ do everything your unit tests do. >My understanding is that such a feature is making it''s way into Code Gears re-factoring capabilities. I haven''t seen it myself, but David "I" mentioned it at railsconf.> -- > Phlip > http://www.oreilly.com/catalog/9780596510657/ > "Test Driven Ajax (on Rails)" > assert_xpath, assert_javascript, & assert_ajax > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org
2007-Jul-10 02:26 UTC
Re: Rename a controller
Hi -- On Mon, 9 Jul 2007, Boop Boop wrote:> > Is there a generator that can rename a controller? I don''t want to have > to manually change all of the files that are associated with the > controller.I don''t think there''s a generator; you''ll probably have to write a script to automate the process and wrap it in a Rake task, or just run it standalone. I imagine there are such scripts around, so maybe this thread will flush one out. David -- * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---