active_record-acts_as 2.1.0 → 2.1.1

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: 72b7784416ad69a0731cce15396045c59b98c4c2
4
- data.tar.gz: 7afa85a1598de8f937c6c6c91b7eea2b97862c09
3
+ metadata.gz: 71fdceb0ce3b5629016ebb56a04e7663d1fbefdd
4
+ data.tar.gz: 9b7bb83ea854a435bf8c6a0198c33e4fdd552e8e
5
5
  SHA512:
6
- metadata.gz: b789d5515ffe491052354386627199337c2ca975513d41755a0519d07158ea9393da5e346c501af60efe23c604dd1ad9f70f0e9cd7507738c0e3846c4a870fb0
7
- data.tar.gz: 9c2c0991e5ce87f8b39eb04898fa0e2c8aa9469e29ee388f6b2a9e9b644f6dd91c858007bb45fe3d00727e0f8b492c2496150dff5614132ac0b03ea9a50148e8
6
+ metadata.gz: ade1a531d8a638c8c14c0f7758f2790e09869463b5e8da0f7042e7043198b9401176b8a58e0ee453159997596ff0b9f62750b559b1253313aa86b56510a28a40
7
+ data.tar.gz: 4a1665b6991794b478bde0d027199eee0d956c6c8a099c94c215c49250470907bb1c6493513c3ce43c8068d31277d181d72ebdee6c420ba8b6d34ea556975181
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [2.1.0] - 2017-03-17
8
+ ### Added
9
+ - Access superobjects from query on submodel by calling `.actables`
10
+
7
11
  ## [2.0.9] - 2017-03-02
8
12
  ### Fixed
9
13
  - Fix handling of query conditions that contain a dot
@@ -53,7 +57,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
53
57
  ### Fixed
54
58
  - Fixed `remove_actable` migration helper (https://github.com/hzamani/active_record-acts_as/pull/71, thanks to [nuclearpidgeon](https://github.com/nuclearpidgeon)!)
55
59
 
56
- [Unreleased]: https://github.com/krautcomputing/active_record-acts_as/compare/v2.0.9...HEAD
60
+ [Unreleased]: https://github.com/krautcomputing/active_record-acts_as/compare/v2.1.0...HEAD
61
+ [2.1.0]: https://github.com/krautcomputing/active_record-acts_as/compare/v2.0.9...v2.1.0
57
62
  [2.0.9]: https://github.com/krautcomputing/active_record-acts_as/compare/v2.0.8...v2.0.9
58
63
  [2.0.8]: https://github.com/krautcomputing/active_record-acts_as/compare/v2.0.7...v2.0.8
59
64
  [2.0.7]: https://github.com/krautcomputing/active_record-acts_as/compare/v2.0.6...v2.0.7
data/_config.yml ADDED
@@ -0,0 +1 @@
1
+ theme: jekyll-theme-minimal
data/bin/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'pry'
5
+ require 'active_record/acts_as'
6
+
7
+ ActiveRecord::Base.logger = Logger.new(STDOUT)
8
+
9
+ require_relative '../spec/models'
10
+
11
+ Pry.start
@@ -11,7 +11,7 @@ module ActiveRecord
11
11
  # applied to the `acting_as_model`. Ignore
12
12
  # conditions that contain a dot or are attributes
13
13
  # of the submodel.
14
- opts, acts_as_opts = opts.stringify_keys.partition { |k, _| k =~ /\./ || attribute_method?(k) }.map(&:to_h)
14
+ opts, acts_as_opts = opts.stringify_keys.partition { |k, _| k =~ /\./ || column_names.include?(k.to_s) }.map(&:to_h)
15
15
 
16
16
  if acts_as_opts.any?
17
17
  opts[acting_as_model.table_name] = acts_as_opts
@@ -1,6 +1,6 @@
1
1
  module ActiveRecord
2
2
  module ActsAs
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
4
4
  end
5
5
  end
6
6
 
data/spec/models.rb CHANGED
@@ -1,4 +1,5 @@
1
- require 'database_helper'
1
+ require_relative 'database_helper'
2
+
2
3
  require 'active_record/acts_as'
3
4
 
4
5
  class Product < ActiveRecord::Base
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record-acts_as
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hassan Zamani
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-17 00:00:00.000000000 Z
12
+ date: 2017-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sqlite3
@@ -128,7 +128,8 @@ description: Simulate multi-table inheritance for activerecord models using a pl
128
128
  email:
129
129
  - hsn.zamani@gmail.com
130
130
  - manuel@krautcomputing.com
131
- executables: []
131
+ executables:
132
+ - console
132
133
  extensions: []
133
134
  extra_rdoc_files: []
134
135
  files:
@@ -142,7 +143,9 @@ files:
142
143
  - LICENSE.txt
143
144
  - README.md
144
145
  - Rakefile
146
+ - _config.yml
145
147
  - active_record-acts_as.gemspec
148
+ - bin/console
146
149
  - gemfiles/rails_4.2.gemfile
147
150
  - gemfiles/rails_5.0.gemfile
148
151
  - lib/active_record/acts_as.rb