thecore_settings 2.0.3 → 2.0.4
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/models/{rails_admin_settings → thecore_settings}/setting.rb +0 -0
- data/config/initializers/rails_admin_requirements.rb +2 -2
- data/config/initializers/thecore_settings_abilities.rb +6 -6
- data/db/migrate/20161227101954_create_rails_admin_settings.rb +1 -1
- data/lib/generators/{rails_admin_settings → thecore_settings}/migration_generator.rb +0 -0
- data/lib/generators/{rails_admin_settings → thecore_settings}/templates/db/migrate/20161227101954_create_thecore_settings.rb +0 -0
- data/lib/generators/{rails_admin_settings → thecore_settings}/templates/migration.rb +0 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fffe406c1ac27ced75d6a8afe8d21dc28e1df165cc33b947aa10d17b86d3dde
|
4
|
+
data.tar.gz: b1fe75965bbaebc4e3687fdf6c469ad32a2432ce1b7123d093e2908d3c4374ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b539c1e5ab12dec985d19a01a5e692dce5847d90865f2f4236542b50e65d2684b77c95a9232c987784dc2cb058dd91ae13a8413910dc14997a0cc249235f516
|
7
|
+
data.tar.gz: 72b7fd28f0d8967b0a7bd9f5524e3b60fb5e7ca1f8649c8c571f8529bd69f5d89a804d4b6a52797e47ddef5305a7868d3e1fa88b1b859d1fa03f3c06b3f01b73
|
File without changes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module ThecoreSettings
|
2
2
|
module RailsAdminExtensionConfig
|
3
3
|
def self.included(base)
|
4
4
|
# IMPORTANT: To extend rails admin section in model, directly, instead of using concerns, I can
|
@@ -19,4 +19,4 @@ module RailsAdminSettings
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# include the extension (loving mixins)
|
22
|
-
|
22
|
+
ThecoreSettings::Setting.send(:include, ThecoreSettings::RailsAdminExtensionConfig)
|
@@ -5,15 +5,15 @@ module TheCoreSettingsAbilitiesConcern
|
|
5
5
|
included do
|
6
6
|
def thecore_settings_abilities user
|
7
7
|
# Rails.logger.debug "Cannot Create"
|
8
|
-
cannot :create,
|
8
|
+
cannot :create, ThecoreSettings::Setting
|
9
9
|
# Rails.logger.debug "Cannot Delete"
|
10
|
-
cannot :destroy,
|
11
|
-
cannot :show,
|
10
|
+
cannot :destroy, ThecoreSettings::Setting
|
11
|
+
cannot :show, ThecoreSettings::Setting
|
12
12
|
|
13
|
-
# cannot :manage, [
|
14
|
-
# cannot :dashboard, [
|
13
|
+
# cannot :manage, [ThecoreSettings::Setting]
|
14
|
+
# cannot :dashboard, [ThecoreSettings::Setting]
|
15
15
|
# # Pay attention to this errorTypeError (can't convert Class to Array (Class#to_ary gives String)):
|
16
|
-
# can [:index, :update], [
|
16
|
+
# can [:index, :update], [ThecoreSettings::Setting] if user && user.admin?
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
@@ -353,7 +353,7 @@ files:
|
|
353
353
|
- app/helpers/.keep
|
354
354
|
- app/mailers/.keep
|
355
355
|
- app/models/.keep
|
356
|
-
- app/models/
|
356
|
+
- app/models/thecore_settings/setting.rb
|
357
357
|
- app/views/.keep
|
358
358
|
- app/views/rails_admin/main/_setting_value.html.haml
|
359
359
|
- assets/javascripts/rails_admin/custom/thecore_settings.rb
|
@@ -370,9 +370,9 @@ files:
|
|
370
370
|
- db/migrate/20161227101956_add_app_name.rb
|
371
371
|
- gemfiles/mongoid-6.0.gemfile
|
372
372
|
- gemfiles/mongoid-6.3.gemfile
|
373
|
-
- lib/generators/
|
374
|
-
- lib/generators/
|
375
|
-
- lib/generators/
|
373
|
+
- lib/generators/thecore_settings/migration_generator.rb
|
374
|
+
- lib/generators/thecore_settings/templates/db/migrate/20161227101954_create_thecore_settings.rb
|
375
|
+
- lib/generators/thecore_settings/templates/migration.rb
|
376
376
|
- lib/tasks/thecore_settings_tasks.rake
|
377
377
|
- lib/thecore_settings.rb
|
378
378
|
- lib/thecore_settings/determine_mime_type.rb
|