thecore 1.7.2 → 1.7.3
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 +4 -4
- data/app/controllers/pages_controller.rb +7 -1
- data/config/initializers/rails_admin.rb +5 -5
- data/config/locales/en.yml +2 -0
- data/lib/abilities.rb +0 -4
- data/lib/thecore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce18dbd1120cd983e242bc6f0c9cc0f7c93be605ac48d9605fd779ed3d25b8ae
|
|
4
|
+
data.tar.gz: fc6f3c86866e30cf675e1526313eaf3a530025719c986bbfb54c48f89aefd43c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8b380af9b5c5c195d086eef8f5cd0c7685cb8a3b48e1bbbdbe45fc991b0f051102b007586728d4147088f4e786e7141a41dfb03a0bf5182a2a32ac2c7288aed
|
|
7
|
+
data.tar.gz: 20c26bdce8f60b0f61988d0217f529c615f28cf686f9823fc71d076aae6594582582282346f0e3355929352fcf20bcf0d1e7bdf47c60fbcd7bec3eb8cbe64d5b
|
|
@@ -2,7 +2,13 @@ class PagesController < ApplicationController
|
|
|
2
2
|
before_action :authenticate_user!, only: [
|
|
3
3
|
:inside, :contact
|
|
4
4
|
]
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
# So the static link navigation can be set runtime (yes it's an hack
|
|
7
|
+
# since I have to set this dynamically at runtime, using a class
|
|
8
|
+
# continously re-evaluated)
|
|
9
|
+
RailsAdmin.config do |config|
|
|
10
|
+
config.navigation_static_label = I18n.t('admin.links.label')
|
|
11
|
+
end
|
|
6
12
|
|
|
7
13
|
def home
|
|
8
14
|
end
|
|
@@ -9,22 +9,22 @@ RailsAdmin.config do |config|
|
|
|
9
9
|
# [(Settings.app_name rescue (ENV["APP_NAME"] || "TheCore App")), "#{controller.params[:action].try(:titleize)} (#{Time.zone.now.to_s(:time)})"]
|
|
10
10
|
# }
|
|
11
11
|
### Popular gems integration
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
## == Devise ==
|
|
14
14
|
config.authenticate_with do
|
|
15
15
|
warden.authenticate! scope: :user
|
|
16
16
|
end
|
|
17
17
|
config.current_user_method(&:current_user)
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
## == Cancan ==
|
|
20
20
|
config.authorize_with :cancancan
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
## == PaperTrail ==
|
|
23
23
|
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
|
|
26
26
|
config.label_methods.unshift(:display_name)
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
config.actions do
|
|
29
29
|
# show_in_app
|
|
30
30
|
dashboard # mandatory
|
data/config/locales/en.yml
CHANGED
data/lib/abilities.rb
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
module TheCoreAbilities
|
|
2
2
|
def core_abilities(user)
|
|
3
|
-
# So the static link navigation can be set runtime (yes it's an hack)
|
|
4
|
-
RailsAdmin.config do |config|
|
|
5
|
-
config.navigation_static_label = I18n.t('admin.links.label')
|
|
6
|
-
end
|
|
7
3
|
# Normal core abilities file
|
|
8
4
|
if user
|
|
9
5
|
can :access, :rails_admin # grant access to rails_admin
|
data/lib/thecore/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thecore
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gabriele Tassoni
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-01-
|
|
11
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|