micro_admin 0.1.0 → 0.1.2
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/README.md +24 -7
- data/lib/micro_admin/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: d2bb6ad04454509e6414a0309c84c7a2ae5ddea3c4e74bb23bbda9126dd7f40a
|
4
|
+
data.tar.gz: 54b3e282a99725591218fa43796887748682c43deb7de815481b96f3022904e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c490d7e1adba0a3607b46013cea52d4ec420da130cb2d610de3b2c5d125a21124e67ec6d176a5203537c0960906789704fcd0eedd00e1afe177599d333f3e1c
|
7
|
+
data.tar.gz: 16007794fc8f36ac2c4635aac850698995ce09a3c5ff65060d312327658820465f640d7ade29ac2c2283f9f2fa33712f46738b8f48e3ba545b8810c907443435
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# MicroAdmin
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
A Minimal Administration dashboard parts.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -23,7 +21,14 @@ Or install it yourself as:
|
|
23
21
|
## Usage
|
24
22
|
|
25
23
|
```ruby
|
26
|
-
class
|
24
|
+
class ApplicationDashboard < MicroAdmin::Dashboard::Base
|
25
|
+
# If you use with Ruby on Rails
|
26
|
+
self.view_paths = [Rails.root.join("app", "views", "dashboards")]
|
27
|
+
end
|
28
|
+
```
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
class UserDashboard < ApplicationDashboard
|
27
32
|
def index_attributes
|
28
33
|
[:id, :name]
|
29
34
|
end
|
@@ -42,6 +47,18 @@ class UserDashboard < MicroAdmin::Dashboard::Base
|
|
42
47
|
end
|
43
48
|
```
|
44
49
|
|
50
|
+
`/app/views/dashboards/user_dashboard/new/name.erb`:
|
51
|
+
|
52
|
+
```html
|
53
|
+
<input type="text" name="name">
|
54
|
+
```
|
55
|
+
|
56
|
+
`/app/views/dashboards/user_dashboard/edit/name.erb`:
|
57
|
+
|
58
|
+
```html
|
59
|
+
<input type="text" name="name" value="<%= value %>">
|
60
|
+
```
|
61
|
+
|
45
62
|
```ruby
|
46
63
|
smith = User.new(id: 1, name: "Smith")
|
47
64
|
jams = User.new(id: 1, name: "Jams")
|
@@ -64,7 +81,7 @@ dashboard = UserDashboard.new
|
|
64
81
|
<%= dashboard.edit(id: 1, values: {name: "Smith"}, errors: []) %>
|
65
82
|
```
|
66
83
|
|
67
|
-
You can decorate table and forms with [Bootstrap](https://getbootstrap.com/docs/5.0/getting-started/download/)
|
84
|
+
**You can decorate table and forms with [Bootstrap](https://getbootstrap.com/docs/5.0/getting-started/download/)!**
|
68
85
|
|
69
86
|
## Development
|
70
87
|
|
@@ -74,8 +91,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
74
91
|
|
75
92
|
## Contributing
|
76
93
|
|
77
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
94
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/cc-kawakami/micro_admin. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
78
95
|
|
79
96
|
## Code of Conduct
|
80
97
|
|
81
|
-
Everyone interacting in the MicroAdmin project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
98
|
+
Everyone interacting in the MicroAdmin project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/cc-kawakami/micro_admin/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/micro_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: micro_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cc-kawakami
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|