egov_utils 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/egov_utils/enum_helper.rb +10 -0
- data/lib/egov_utils/engine.rb +1 -0
- data/lib/egov_utils/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d483ae93a2a968f5ff4fb74cecac3790bc9942a7e5488dba7500672e8ae570e
|
4
|
+
data.tar.gz: 4324879d422fd21c52dab7193957b4ca25a5e1998f01121df79b527b4c1e052f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4efad04faa1075277da1fa431f0161d5552e696e86d62934a675b18e8fd78f0b2969e9354ac66150acd2a6a4f8a73cd6283c425e34d8d4b4ca938195c7f818f4
|
7
|
+
data.tar.gz: 7f3d2077e44771b85f3e853cc34fe8b016d30d268c4bcd022e8f5e46aa49f8d4bce662eedb9f2da00f79611ed997f46366fa4ae0b09c61b5aa0eaf568cc546d6
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module EgovUtils
|
2
|
+
module EnumHelper
|
3
|
+
|
4
|
+
def enum_values_for_select(klass, method)
|
5
|
+
plur_method = method.to_s.pluralize
|
6
|
+
klass.send(plur_method).collect{|val, _| [t("activerecord.attributes.#{klass.model_name.i18n_key}.#{plur_method}.#{val}"), val]}
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
10
|
+
end
|
data/lib/egov_utils/engine.rb
CHANGED
data/lib/egov_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egov_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -296,6 +296,7 @@ files:
|
|
296
296
|
- app/controllers/egov_utils/sessions_controller.rb
|
297
297
|
- app/controllers/egov_utils/users_controller.rb
|
298
298
|
- app/helpers/egov_utils/application_helper.rb
|
299
|
+
- app/helpers/egov_utils/enum_helper.rb
|
299
300
|
- app/helpers/egov_utils/grid_helper.rb
|
300
301
|
- app/helpers/egov_utils/groups_helper.rb
|
301
302
|
- app/helpers/egov_utils/roles_helper.rb
|
@@ -481,7 +482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
481
482
|
version: '0'
|
482
483
|
requirements: []
|
483
484
|
rubyforge_project:
|
484
|
-
rubygems_version: 2.7.
|
485
|
+
rubygems_version: 2.7.2
|
485
486
|
signing_key:
|
486
487
|
specification_version: 4
|
487
488
|
summary: The eGoverment utilities is set of functionalities to support basic eGoverment
|