[Rails] Re: Automatically get a list of controller names

2009-08-21 Thread Ramon Tayag
I have this bad habit of starring (gmail) messages and forgetting to get back to it. Better late than never. Thanks jasoo and willhaslett! Ramon Tayag On Sat, Feb 28, 2009 at 3:19 AM, jasoo24jaso...@gmail.com wrote: I would recommend that you hard-code that list and also include controller

[Rails] Re: Automatically get a list of controller names

2009-02-27 Thread jasoo24
I would recommend that you hard-code that list and also include controller names you may use in the future and reserved or restricted words. On Feb 26, 5:49 pm, Ramon Tayag ramon.ta...@gmail.com wrote: Okay, just a follow up question: is there an automatic way to make an array of all

[Rails] Re: Automatically get a list of controller names

2009-02-26 Thread willhaslett
@conts_and_meths = [] controllers = Dir.new(#{RAILS_ROOT}/app/controllers).entries controllers.each do |controller| if controller =~ /_controller/ and not controller.index(\.swp) then cont = controller.camelize.gsub(.rb,) meths = (eval(#{cont}.new.methods) -