enum_select_rails 0.1.0 → 0.2.0

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: 1ad7528894f2dfea689a5bad101034f53a90fafbff59cf8da81905c9b2a46602
4
- data.tar.gz: 7cbc8c2a2be0ff5e650accc86d3bb870e2bd4eefc8632f62ca49dcffab322b75
3
+ metadata.gz: e5d88b0b9e06e40fecec284a27408397f10c9b9b02296f6b3048ace2f3f54bfe
4
+ data.tar.gz: f362663c5cfc0542e1ceac2b177b41cf58b56d962b5c838593e322e185eee094
5
5
  SHA512:
6
- metadata.gz: 12f58473f710cd2cefd426632a7c56e99b407bbae373d994dfb6eeb5495238ba9bca9ffb1ae3941102354275ff04889fe4e294cf864c89465cf80a67471114bb
7
- data.tar.gz: b7601829a439c1edc3b81c0b52b80e44a8c30ef1fdf88f984d07db807d27112df15cb5fba95d73cbdafbb73d05833f5e719b2d7c174badd039627fd04eb69e52
6
+ metadata.gz: 73874fdce322c2928b233e458aae1900bef5d50882f553237cf866675a5aa188f56dbbe5b5ff5ad93d00f0af2d324fd8a02f25d0917c91d4eb738342d6df05e4
7
+ data.tar.gz: a148579af25583e261cd22d516dfd8439e9c5a5ad3ad216086341c8b4843a1419f6436bbbfe39a71234d76558438d7c2c201b02f584b5b99c8f16e6332b487bc
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # EnumSelectRails
2
+
2
3
  A form helper for the enum field of Rails model.
3
4
 
4
- ## Usage
5
+ You can easily generate select tag which has enum field options.
6
+
7
+ ![image](https://user-images.githubusercontent.com/3489430/38072782-eebbea40-3362-11e8-911b-18f56f8b9ed4.png)
5
8
 
6
- ```erbruby
7
- <%= f.enum_select :your_field_name %>
8
- ```
9
9
 
10
10
  ## Installation
11
11
  Add this line to your application's Gemfile:
@@ -14,8 +14,30 @@ Add this line to your application's Gemfile:
14
14
  gem 'enum_select_rails'
15
15
  ```
16
16
 
17
+ ## Usage
18
+
19
+ ```ruby
20
+ class User
21
+ enum gender: {
22
+ female: 2,
23
+ male: 1,
24
+ other: 9
25
+ }
26
+ end
27
+ ```
28
+
29
+ ```erbruby
30
+ <%= f.enum_select :gender %>
31
+ ```
32
+
17
33
  ## i18n
18
34
 
35
+ Automatically apply i18n text into options text.
36
+
37
+ This feature is depends on [enum_help](https://github.com/zmbacker/enum_help).
38
+
39
+ ![image](https://user-images.githubusercontent.com/3489430/38072879-65777b04-3363-11e8-9654-5cf1f64cee17.png)
40
+
19
41
  ```ruby
20
42
  # Gemfile
21
43
  gem 'enum_help'
@@ -44,9 +66,5 @@ ja:
44
66
  other: その他
45
67
  ```
46
68
 
47
-
48
- ## Contributing
49
- Contribution directions go here.
50
-
51
69
  ## License
52
70
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -1,3 +1,3 @@
1
1
  module EnumSelectRails
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enum_select_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tanakaworld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-28 00:00:00.000000000 Z
11
+ date: 2018-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.4
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.1.4
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: enum_help
29
29
  requirement: !ruby/object:Gem::Requirement