infopark_reactor 1.14.0.beta1 → 1.14.0.beta2

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: 5aded46ad784b7ded5b0ec6749781ebfce0489c4
4
- data.tar.gz: ffc35216cfef893bb3787951e204f80ba47d0b9b
3
+ metadata.gz: 0d31c45363fc66e4fa2e33a596a28f961273a77f
4
+ data.tar.gz: 6d6bf3a3de71313b9e2b23f7431e528f2f88f3c0
5
5
  SHA512:
6
- metadata.gz: 85e8e9fb655e0c45256f63f49cf39c547f99e9f955cf9a25d224339a0f808255b2bbe0b03e133203ddbca27d34ff5d5c8394a4cb5c6f9352248d640ed649470d
7
- data.tar.gz: a854315cd9355f1fd1c4e0c848d22eec08f978ce9d9f8dd22e9531fe8f8f072a57724c9ca903741eef8bf54a12730ff48b445e77dab42529c84f51d6807eadb7
6
+ metadata.gz: 3fd880bf792f8a5677169c4bb1864fd29411d92756ff1c833eddf1ce43268f921ce6f30c0d35293d70412497a0d6b93fd223cd7ac0e88c124e6880e5008c6936
7
+ data.tar.gz: 8ada3be23e66e43a73f0f2d3075553b15787cd34112826cf702203c918e585a9d2d88ff84671dff83fe516210e8693eb82097f160aba9a803cdbd07f07691a97
@@ -9,8 +9,13 @@ module RailsConnector
9
9
 
10
10
  self.primary_key = :obj_class_id
11
11
 
12
- has_and_belongs_to_many :custom_attributes_raw, :class_name => '::RailsConnector::Attribute',
13
- :join_table => "#{table_name_prefix}obj_class_attrs"
12
+ if Reactor.rails4_x?
13
+ has_many :custom_attributes_jt, :class_name => '::RailsConnector::ObjClassAttr', :foreign_key => 'obj_class_id', :primary_key => 'obj_class_id'
14
+ has_many :custom_attributes_raw, :through => :custom_attributes_jt, :source => :custom_attributes_raw
15
+ else
16
+ has_and_belongs_to_many :custom_attributes_raw, :class_name => '::RailsConnector::Attribute',
17
+ :join_table => "reactor.#{table_name_prefix}obj_class_attrs"
18
+ end
14
19
 
15
20
  alias_attribute :name, :obj_class_name
16
21
 
@@ -0,0 +1,5 @@
1
+ module RailsConnector
2
+ class ObjClassAttr < RailsConnector::AbstractModel
3
+ has_many :custom_attributes_raw, :class_name => '::RailsConnector::Attribute', :foreign_key => 'attribute_id', :primary_key => 'attribute_id'
4
+ end
5
+ end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Reactor
3
- VERSION = "1.14.0.beta1"
3
+ VERSION = "1.14.0.beta2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_reactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0.beta1
4
+ version: 1.14.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Przedmojski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-17 00:00:00.000000000 Z
11
+ date: 2015-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -107,6 +107,7 @@ files:
107
107
  - app/models/rails_connector/content.rb
108
108
  - app/models/rails_connector/meta/eager_loader.rb
109
109
  - app/models/rails_connector/obj_class.rb
110
+ - app/models/rails_connector/obj_class_attr.rb
110
111
  - app/models/rails_connector/object_with_meta_data.rb
111
112
  - config/routes.rb
112
113
  - infopark_reactor.gemspec