Permalink
Browse files

Beginning to load models

  • Loading branch information...
1 parent 33b32f2 commit 8043cf96edfbc59c5947374d9a1ded0cc53d3312 @rstawarz committed Apr 28, 2011
Showing with 19 additions and 1 deletion.
  1. +19 −1 lib/vain_models/engine.rb
View
@@ -6,5 +6,23 @@ class Engine < Rails::Engine
end
end
-
+ class Manifest
+ attr_accessor :models
+ def initialize
+ find_models
+ end
+
+ def model_dir
+ Dir.join(Rails.root, 'app', 'models')
+ end
+
+ def find_model_files
+ model_files = []
+ Dir.chdir(model_dir) do
+ model_files = Dir["**/*.rb"]
+ end
+
+ model_files
+ end
+ end
end

0 comments on commit 8043cf9

Please sign in to comment.