Introduction
Introduction Statistics Contact Development Disclaimer Help
remember whether it's Rails 3 in a constant - reportable - Fork of reportable r…
Log
Files
Refs
README
---
commit 7c57d0f36271b70c411e8097465a55be20326458
parent 1f28714d741a7eb445ab9110770737523f7fea41
Author: Marco Otte-Witte <[email protected]>
Date: Mon, 19 Apr 2010 12:33:14 +0200
remember whether it's Rails 3 in a constant
Diffstat:
M generators/reportable_migration/re… | 2 +-
M lib/saulabs/reportable.rb | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/generators/reportable_migration/reportable_migration_generator.rb …
@@ -1,4 +1,4 @@
-if defined?(Rails) && Rails::VERSION::MAJOR >= 3
+if Saulabs::Reportable::IS_RAILS3
require 'rails/generators'
require 'rails/generators/migration'
diff --git a/lib/saulabs/reportable.rb b/lib/saulabs/reportable.rb
@@ -5,7 +5,9 @@ module Saulabs
module Reportable
- require 'saulabs/reportable/railtie' if defined?(Rails) && Rails::VERSION:…
+ IS_RAILS3 = defined?(Rails) && Rails::VERSION::MAJOR >= 3
+
+ require 'saulabs/reportable/railtie' if IS_RAILS3
# Extends the {Saulabs::Reportable::ClassMethods#reportable} method into +…
#
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.