Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated templates

  • Loading branch information...
commit e5c369457c621911c717f12fdc4d984ca174b9a8 1 parent 2642d99
Joshua Lippiner authored
View
BIN  dynamic_reports-0.0.0.gem
Binary file not shown
View
10 lib/dynamic_reports.rb
@@ -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
-
Please sign in to comment.
Something went wrong with that request. Please try again.