Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

applicationcontrollermethods

list all controllers & actions
Tuesday, 26 July 2011 11:24
// description of your code here


controllers = Dir.new("#{RAILS_ROOT}/app/controllers").entries
controllers.each do |controller|
if controller =~ /_controller/
cont = controller.camelize.gsub(".rb","")
puts cont
(eval("#{cont}.new.methods") -
ApplicationController.methods -
Object.methods -
ApplicationController.new.methods).sort.each {|met|
puts "\t#{met}"
}
end

end

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/Ma2dfweJ7lA/13409

 


Taxonomy by Zaragoza Online