awesome_translations 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b375c005d186492da432ff61ee765d1cec23561d
|
4
|
+
data.tar.gz: 880aaef8a675d36e7564b83275ca9f2515f2a08c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e7802f5bb02f054029758938701f17ce82bd43e38011b3c560d8fd76dd6be8b646f484233f190fd1a353988607877ffee9dd0d70b789760b51fed823ce28f43
|
7
|
+
data.tar.gz: 0a5ca541fdc9087642ed5011047609b1c73a4598aee6587129efe401de0543163acbda928903bb238523ba08fdf52f399c857a02063be808c348000c94b58ed9
|
@@ -2,6 +2,7 @@ class AwesomeTranslations::ModelInspector
|
|
2
2
|
autoload :Attribute, "#{File.dirname(__FILE__)}/model_inspector/attribute"
|
3
3
|
|
4
4
|
attr_reader :clazz
|
5
|
+
cattr_accessor :models_loaded
|
5
6
|
|
6
7
|
# Yields a model-inspector for each model found in the application.
|
7
8
|
def self.model_classes
|
@@ -88,10 +89,16 @@ private
|
|
88
89
|
|
89
90
|
# Preloads all models for Rails app and all engines (if they aren't loaded, then they cant be inspected).
|
90
91
|
def self.load_models
|
92
|
+
return false if AwesomeTranslations::ModelInspector.models_loaded
|
93
|
+
|
94
|
+
AwesomeTranslations::ModelInspector.models_loaded = true
|
95
|
+
|
91
96
|
load_models_for(Rails.root)
|
92
97
|
engines.each do |engine|
|
93
98
|
load_models_for(engine.root)
|
94
99
|
end
|
100
|
+
|
101
|
+
return true
|
95
102
|
end
|
96
103
|
|
97
104
|
def self.engines
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awesome_translations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|