auto_set 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +22 -0
- data/lib/auto_set/set_column.rb +1 -1
- data/lib/auto_set/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3da776d373b205cfcb9664fcc1f71d3364b93180
|
4
|
+
data.tar.gz: 44bce8beaa604a02ce868ed23481598765f3bb52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10c24f50d104356cf9eee73285087b270986a6f8760f95969ec6effae930eff2d68254f8048daba80bb7de6fc1c3c92565bef9fac5dda40c12ccf5980f42950f
|
7
|
+
data.tar.gz: 945f75b2c03228e35c7ae005384e8150246d80aa73162741ce5deba2b208810b6c86ff355933416aefc609aaf21702bd8b5389e056c67b7f298a3b9c5bbdca5c
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Felipe Diesel
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/auto_set/set_column.rb
CHANGED
@@ -56,7 +56,7 @@ module AutoSet
|
|
56
56
|
|
57
57
|
def parent_from_column(column, from)
|
58
58
|
if @record.send("#{column}_#{from}").present?
|
59
|
-
reflection = @record.class.reflections[column
|
59
|
+
reflection = @record.class.reflections.with_indifferent_access[column]
|
60
60
|
reflection.klass.where(from => @record.send("#{column}_#{from}")).first if reflection.present?
|
61
61
|
end
|
62
62
|
end
|
data/lib/auto_set/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_set
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felipe Diesel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- .travis.yml
|
178
178
|
- Gemfile
|
179
179
|
- Guardfile
|
180
|
+
- LICENSE.txt
|
180
181
|
- README.md
|
181
182
|
- Rakefile
|
182
183
|
- auto_set.gemspec
|