rails_optimizer 0.1.2 → 0.1.3

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: 51932ccdf691ba5d2b226ea43f5fb68dc1e45aad
4
- data.tar.gz: 9529d9c3dd83c7f08ba150e42197d6dd2986e355
3
+ metadata.gz: 4dbcf811feb6eb7b70788be32435558802e7a318
4
+ data.tar.gz: 11a915e895561996d898497b4de9cb0ff98b89e3
5
5
  SHA512:
6
- metadata.gz: 2f4f82db45e9fde9d63043102358e65a2b854de76f51c118056cfb237c6f0e779a424e5009759e35e0ffb7327cf6235c9eec46eca3ac7fe2939b9cd6ebd3275a
7
- data.tar.gz: 803ddf88add1e53c52b6118676a821e51fe28b6a3efd30918c9774fc6ebd2f082fdcd73f51883aaf2810646003c51b8710be00383bdfa727b502630fcb990343
6
+ metadata.gz: aee3b50dfd806091de19ce996854a7a05029f97f4e6fc72d0ed54f322a3f77ed07284f652a9576fdc8ef5fc6ce237f2172080e1729ae17223340b2830a8d1afc
7
+ data.tar.gz: 4fc5b1d865a4dbb59987dd6b36c9c8f900a3c5c7e856643f8bb1fbccf45f6efe5c514a1a50adc29531658d8e87219d3db36695fc293e311e63a0f0f8dceca6f7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_optimizer (0.1.1)
4
+ rails_optimizer (0.1.2)
5
5
  activerecord
6
6
  activesupport
7
7
 
@@ -30,11 +30,12 @@ module RailsOptimizer
30
30
  def self.belongs_to(name, scope = nil, **options)
31
31
  super
32
32
  define_method name.to_s do |*args|
33
+ super if args.empty?
33
34
  if options[:polymorphic]
34
35
  read_attribute("#{name}_type".to_sym).classify
35
36
  else
36
37
  name.to_s.classify
37
- end.constantize.select(:id, *args).scoped(scope).finded(self, name)
38
+ end.constantize.select(*args).scoped(scope).finded(self, name)
38
39
  end
39
40
  end
40
41
 
@@ -1,3 +1,3 @@
1
1
  module RailsOptimizer
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_optimizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo A. Díaz Martínez