forest_liana 1.1.30 → 1.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8c61cca79d81e2d1d325eed17335c37ccd04347
4
- data.tar.gz: 53171e4c8959338e211dfa666c79cc6e7a16aaaa
3
+ metadata.gz: 020fb95d724c2bdc2b428b8c934a5f5607a6f262
4
+ data.tar.gz: eb9450f1577ce28754ec4bed2947921cd3992331
5
5
  SHA512:
6
- metadata.gz: 91828deca444c0822687ddce5f77b717647c08b4835d1c7678c1f9b1928cfd42916926142e43b6bff605585336693f9154a672a6283520bf3ed535d9a469ec68
7
- data.tar.gz: 994e9efdc1f89a99004d89e226ae84d8616db81cab8ef7e7d0041a33308f1b7568d05300d981637ce249cadbaa50b74189cd279ff21afc88bc929dda694ea103
6
+ metadata.gz: 62423f8803b4451e62f7dd7402ae075f421ba9e86675af5484a248a6fb35b05ac3ffb489347f56986b6ac40375d23b9a3b0be1f28e772c6468feff2630c5e7e0
7
+ data.tar.gz: b07de0067fc62ab8beacc0dc7625b2e7d55e8496d9c78a2f0d1ce95dd258b7e933db3c4620060b06011419eaeed2e8f81df4f1b07fd8921562a54907b4dc2991
@@ -8,9 +8,7 @@ module ForestLiana
8
8
  end
9
9
 
10
10
  def self.find_model_from_table_name(table_name)
11
- (table_name.classify.constantize rescue nil) ||
12
- (table_name.capitalize.constantize rescue nil) ||
13
- (table_name.sub('_', '/').camelize.singularize.constantize rescue nil)
11
+ ActiveRecord::Base.subclasses.find {|s| s.table_name == table_name}
14
12
  end
15
13
 
16
14
  def self.tables_names
@@ -4,6 +4,9 @@ module ForestLiana
4
4
  def initialize(app)
5
5
  @app = app
6
6
  @logger = Logger.new(STDOUT)
7
+
8
+ Dir[Rails.root.join('app', 'models', '**', '*.rb')]
9
+ .each(&method(:require))
7
10
  end
8
11
 
9
12
  def perform
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "1.1.30"
2
+ VERSION = "1.1.31"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.30
4
+ version: 1.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda