Hi All, I''ve got some controllers in my project which I no longer need. -- They were generated by scaffolding. Is there an easy way to remove them? -- I.E. via the command-line. If not, is there a way to do it manually? Thanks! : ) Jason
Jason Tuttle wrote:> Hi All, > > I''ve got some controllers in my project which I no longer need. -- > They were generated by scaffolding. > > Is there an easy way to remove them? -- I.E. via the command-line.Check out the "script/destroy" command -- Josh Susser http://blog.hasmanythrough.com -- Posted via http://www.ruby-forum.com/.
You can delete them like you would any file. There is nothing magical about a controller that never gets called. My apps have models that don''t have controllers and controllers that don''t have a model. Jason Tuttle wrote:> Hi All, > > I''ve got some controllers in my project which I no longer need. -- > They were generated by scaffolding. > > Is there an easy way to remove them? -- I.E. via the command-line. > > If not, is there a way to do it manually? > > Thanks! > > : ) > > Jason-- Posted via http://www.ruby-forum.com/.
On Apr 17, 2006, at 7:10 PM, rails-request@lists.rubyonrails.org wrote:> Jason Tuttle wrote: >> Hi All, >> >> I''ve got some controllers in my project which I no longer need. -- >> They were generated by scaffolding. >> >> Is there an easy way to remove them? -- I.E. via the command-line. > > Check out the "script/destroy" command > > -- > Josh Susser > http://blog.hasmanythrough.com > > -- > Posted via http://www.ruby-forum.com/.Thanks Josh! -- That worked like a charm. It looks like the script removed: The controller file The helper for the controller The functional test for the controller The view folder for the controller Is that all there is to it? : ) Jason