Permalink
Browse files

updated templates

  • Loading branch information...
1 parent 2642d99 commit e5c369457c621911c717f12fdc4d984ca174b9a8 Joshua Lippiner committed Jul 16, 2009
Showing with 8 additions and 2 deletions.
  1. BIN dynamic_reports-0.0.0.gem
  2. +8 −2 lib/dynamic_reports.rb
View
Binary file not shown.
View
@@ -22,7 +22,14 @@ def self.default_view_paths=(paths)
# require "dynamic_reports/rails"
# For now placing the code right here:
if defined?(Rails)
- # Load all defined reports.
+ # ath_to_lib = File.join(Rails.root, "app") #adjust if necessary
+ # path_to_tree = "#{path_to_lib}/reports"
+ # Dir["#{path_to_tree}/**/*.rb"].each { |fn|
+ # fn =~ /^#{Regexp.escape(path_to_lib)}\/(.*)\.rb$/
+ # require $1
+ # }
+
+ # Load all defined reports.
# Question: How to get Rails to reload files other than ones matching the requested constant...
#Dir.glob("#{File.join(Rails.root, "app", "reports")}/*.rb").each { |file| require file }
ActiveSupport::Dependencies.load_paths << File.join(Rails.root, "app", "reports")
@@ -44,4 +51,3 @@ def self.default_view_paths=(paths)
# TODO: Generator
end
-

0 comments on commit e5c3694

Please sign in to comment.