micro_admin 0.1.0 → 0.1.1
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 +22 -5
- 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: 4daa4b636cdeaea2a11e187bf76d0d9fbadcc9ddd359a112dd687cebdd0e01aa
|
4
|
+
data.tar.gz: ea193d0c6db748ea7d7f8bb25bde91fe118eefb997276451d605d98cb4822f2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7ee67eb5578a8b7ff6f90316d0d8163171936b566d6c169f64af88543392bd83b745461a5c56bb3a3557e621e641482395a8e2ff0c24a48f33fdb79aee5c17e
|
7
|
+
data.tar.gz: dff2ea8a5e9a31f11e9da15e67fc9d6bb6698cd9d79c3f0e03e60edcce204b43d81e27a5f15c55c499c973f1af341d221cdc7b9532b8842f0524a84cc3654f56
|
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
|
|
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.1
|
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
|