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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -5
  3. data/lib/micro_admin/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e6c904e80504c5021c5771fd06b281af4e507e5e2805f387da7c6cbb2f99f61
4
- data.tar.gz: 637de506634334380febb4cbbc3540249fe58c0a28f9bb2fadc807824a636a66
3
+ metadata.gz: 4daa4b636cdeaea2a11e187bf76d0d9fbadcc9ddd359a112dd687cebdd0e01aa
4
+ data.tar.gz: ea193d0c6db748ea7d7f8bb25bde91fe118eefb997276451d605d98cb4822f2d
5
5
  SHA512:
6
- metadata.gz: 4201857a17e9d0b1d1979862df3c427616cb8424956933dba88b07dff4bf269dea1f284aa4d7b330a8ce17530fa7973369b32aa79893f9ed841536d9a880e082
7
- data.tar.gz: e3ec1a869325160628ad73c62b2a5f718f139bfad176ec1199b6b876382f7313fd83e7f17aae34f1853ecb5d10b7c1d7ff162d8895f89d376b9a5050d8e2d3fc
6
+ metadata.gz: a7ee67eb5578a8b7ff6f90316d0d8163171936b566d6c169f64af88543392bd83b745461a5c56bb3a3557e621e641482395a8e2ff0c24a48f33fdb79aee5c17e
7
+ data.tar.gz: dff2ea8a5e9a31f11e9da15e67fc9d6bb6698cd9d79c3f0e03e60edcce204b43d81e27a5f15c55c499c973f1af341d221cdc7b9532b8842f0524a84cc3654f56
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # MicroAdmin
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/micro_admin`. To experiment with that code, run `bin/console` for an interactive prompt.
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 UserDashboard < MicroAdmin::Dashboard::Base
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
 
@@ -1,3 +1,3 @@
1
1
  module MicroAdmin
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-29 00:00:00.000000000 Z
11
+ date: 2022-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler