thecore_print_with_template 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07c165d284697b35870539b1d4e15166cc6d58d8ed013be9d151239ab31ee276
4
- data.tar.gz: cf49e83eac62d0e28322c73f9dffada0dcbfb6bbb894b65a941459907ef7edbf
3
+ metadata.gz: 70214d3834b9c0b2c0fd569896cccd6af431c9d0de7678ac79f3d79b879b4492
4
+ data.tar.gz: f56629d6030914cf6c20cffc7ee2051d8a6657bf7672305fa4e5dfd5f5e6e34f
5
5
  SHA512:
6
- metadata.gz: 3b1a2700368ffd65857b2beea879d17f2197e85ca7885765e29f649d714cb6e408ccd6d2d1c3c92232adf02a3f687071186605b1e3884a614965f30d2ab937e3
7
- data.tar.gz: d3faca4cdc7e9c03d1bb4352eb7205953035163389de61220e5acf594409042ec5b732707de0ccb921a76dd11a886b097fb956a0bcd239d5327af0cf441eaff5
6
+ metadata.gz: dce871f3afd86e01df364b15eacf6df2c47beb3cd45474b642ab3b1262661a1eefafc602484de40df2dec8084bfa6c21ae53908fb03cee929f8cc027d2816b81
7
+ data.tar.gz: 3ab670108dd54c2d11cb1791634416c714708d2b2c5912ff5d9b9fe0d4c7706614baaaab930b48d94de9fff6dc6b54643c7b7e41e7479c5f8dcf7680cbfaf733
@@ -1,23 +1,20 @@
1
-
2
- require 'active_support/concern'
3
-
4
- module ThecorePrintWithTemplateAbilitiesConcern
5
- extend ActiveSupport::Concern
6
- included do
7
- def thecore_print_with_template_abilities user
8
- if user
9
- # if the user is logged in, it can do certain tasks regardless his role
10
- if user.admin?
11
- # if the user is an admin, it can do a lot of things, usually
12
- end
13
-
14
- if user.has_role? :role
15
- # a specific role, brings specific powers
16
- end
1
+ module Abilities
2
+ class ThecorePrintWithTemplatesCommon
3
+ include CanCan::Ability
4
+ def initialize user
5
+ if user
6
+ # if the user is logged in, it can do certain tasks regardless his role
7
+ if user.admin?
8
+ # if the user is an admin, it can do a lot of things, usually
9
+ end
10
+
11
+ if user.has_role? :role
12
+ # a specific role, brings specific powers
13
+ end
14
+ end
17
15
  end
18
16
  end
19
- end
20
17
  end
21
18
 
22
19
  # include the extension
23
- TheCoreAbilities.send(:include, ThecorePrintWithTemplateAbilitiesConcern)
20
+ # TheCoreAbilities.send(:include, ThecorePrintWithTemplateAbilitiesConcern)
@@ -1,3 +1,3 @@
1
1
  module ThecorePrintWithTemplate
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_print_with_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni