how to find all model names in a rails project ?
On Dec 30, 8:44 pm, Pokkai D. [email protected]
wrote:
how to find all model names in a rails project ?
Posted viahttp://www.ruby-forum.com/.
you could:
Dir[“app/models/*”].each do |f| p f ##
OR:
ActiveRecord::Base.connection.tables.map {|t| t.classify}
from the nice folks in NZ:
http://groups.google.com/group/WellRailed/browse_frm/thread/abd9440d0eb26d44
or in MySQL, SHOW TABLES;
thank you gene tani