para-acl 0.3.0 → 0.3.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: 6831e21dedb07eaaa49215ebbbacd35cacdbabb5
4
- data.tar.gz: 7cbc10e24b9a67e20cf2bf2e22b6c46c809e0e09
3
+ metadata.gz: e687558540f0ff922f605dee93fe58657f301a6a
4
+ data.tar.gz: 2e7072a119f1476a5e4557965b76fad099c97abf
5
5
  SHA512:
6
- metadata.gz: 89aafe69c9079f39e77e6f7055218053dcf0658dbeda4154a757d853416f2e904a52f5709185263983b914ff2b5acba6c890d57e7808e0b52404d766b286d965
7
- data.tar.gz: 73db47e95840e6576e51b9d7293fb3b6b78b9307f4b0069006ee90924f7674c1eb328853c5c8b2e82038a193eef112f4e1a0c1e7106311656eb998e53dc5d827
6
+ metadata.gz: 7577e7bb74935b46b1d711a4faf6e04d3da37a675644e7ae7338730497b0f62a9992e328e5c4bec4792b4214fef221a40ada1cb237fef3dc24bafc6e650adcf5
7
+ data.tar.gz: e2578089eaf407fda21f2264a4cea0ffaedc7db2145503d649a450d04221a67c21cff9abb6e7d8c44bd015bdf167a1bcf679c95ff7eb5940d75a3673273958c1
@@ -4,10 +4,13 @@ module Para
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- has_many :role_components, class_name: 'Para::Acl::RoleComponent',
8
- foreign_key: :component_id,
9
- dependent: :destroy
10
- has_many :roles, through: :role_components
7
+ before_destroy :clean_role_components
8
+ end
9
+
10
+ private
11
+
12
+ def clean_role_components
13
+ ::Para::Acl::RoleComponent.where(component: self).destroy_all
11
14
  end
12
15
  end
13
16
  end
@@ -1,5 +1,5 @@
1
1
  module Para
2
2
  module Acl
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: para-acl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentin Ballestrino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-27 00:00:00.000000000 Z
11
+ date: 2016-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: para