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: 4eaebe4c661f98874b439340b95b52d5691f2a7e
4
- data.tar.gz: f37e4e6bc411240c3e9c585089078475f1407684
3
+ metadata.gz: b375c005d186492da432ff61ee765d1cec23561d
4
+ data.tar.gz: 880aaef8a675d36e7564b83275ca9f2515f2a08c
5
5
  SHA512:
6
- metadata.gz: 73b78f58082a89e90dcce5da3837ea7c76b4a9d9b62e9758dcef982711739ddd418cc9ba982abcfbf613c70528eb0c18356aa5c1af61870263d21ab73b5e802f
7
- data.tar.gz: 978b8749d6dd7710bf6598f2fe1b3688d1fd25745e054785f1192f1775635e51177c1212e082b09261ee492255b81db5da2c3a3c3a479c4ddcf7dd62d0726257
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
@@ -1,3 +1,3 @@
1
1
  module AwesomeTranslations
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
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.6
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-04-25 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails