activeadmin-poro-decorator 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/activeadmin-poro-decorator-0.0.2.gem +0 -0
- data/activeadmin-poro-decorator.yml.example +2 -0
- data/lib/activeadmin-poro-decorator.rb +4 -1
- data/lib/activeadmin-poro-decorator/config.rb +4 -4
- data/lib/activeadmin-poro-decorator/railtie.rb +11 -0
- data/lib/activeadmin-poro-decorator/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 062fc917857ffe5237e7f2181fc833efe04c0c7e
|
4
|
+
data.tar.gz: ee6263f3ec74786489cdded3c7ed105f77148001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fab7bc34263caf9f0db16e492a23e2ea85f874b0070fb4f858ea054ad9d31a8c03dad66e1dcb21e66c5a9fcf042330ac530d22c1cc5f851c3af3003c6fcbc314
|
7
|
+
data.tar.gz: b377a8fd655c5e2a5507567c435e96d640c7783e65aa7af88e540a868e794db705f6773ecd70e6d824a67489955ef4262ed58e2077b0d59b5175f992c17fa47a
|
Binary file
|
@@ -2,6 +2,8 @@ require 'activeadmin-poro-decorator/version'
|
|
2
2
|
require 'activeadmin-poro-decorator/config'
|
3
3
|
|
4
4
|
module ActiveadminPoroDecorator
|
5
|
+
require 'activeadmin-poro-decorator/railtie' if defined?(Rails)
|
6
|
+
|
5
7
|
extend ActiveSupport::Concern
|
6
8
|
|
7
9
|
def helpers
|
@@ -39,7 +41,8 @@ module ActiveadminPoroDecorator
|
|
39
41
|
end
|
40
42
|
|
41
43
|
def klass
|
42
|
-
|
44
|
+
config = Config::Reader.new
|
45
|
+
"#{@class_name}#{config.param('modelname')}".constantize
|
43
46
|
end
|
44
47
|
|
45
48
|
def wrapped_collection
|
@@ -4,12 +4,12 @@ module ActiveadminPoroDecorator
|
|
4
4
|
module Config
|
5
5
|
class Reader
|
6
6
|
def initialize
|
7
|
-
@config = YAML.load_file('activeadmin-poro-decorator.yml
|
7
|
+
@config = YAML.load_file('config/activeadmin-poro-decorator.yml')
|
8
8
|
end
|
9
|
-
end
|
10
9
|
|
11
|
-
|
12
|
-
|
10
|
+
def param(name)
|
11
|
+
@config[name]
|
12
|
+
end
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin-poro-decorator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krivich Ekaterina
|
@@ -67,10 +67,12 @@ files:
|
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
69
|
- activeadmin-poro-decorator-0.0.1.gem
|
70
|
+
- activeadmin-poro-decorator-0.0.2.gem
|
70
71
|
- activeadmin-poro-decorator.gemspec
|
71
72
|
- activeadmin-poro-decorator.yml.example
|
72
73
|
- lib/activeadmin-poro-decorator.rb
|
73
74
|
- lib/activeadmin-poro-decorator/config.rb
|
75
|
+
- lib/activeadmin-poro-decorator/railtie.rb
|
74
76
|
- lib/activeadmin-poro-decorator/version.rb
|
75
77
|
- lib/tasks/copy_config.rake
|
76
78
|
- spec/spec_helper.rb
|