rails_options 0.1.3 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/db/migrate/20220316133202_create_rails_options.rb +2 -3
- data/lib/rails_options/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: c158a535bcd115cd07aa97f1d41a6cc1a424f122a4aa93399827bc26308cd9b4
|
4
|
+
data.tar.gz: 73b28bea65bb56d68fd27328e7cc1c9bd65fd5813de90c13f75f5e63bda82d1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 754693442592cff49084eeaab39219367e45eadd91465ee704e4742737075df91b39550c65fcd927cdcd1d5d34cf520beacb374e529dc0218fef79e73ed1a0c1
|
7
|
+
data.tar.gz: 6f5ccb822d8801093aaded0aa6c74139c366332cae9e4bb70d39be836c409706f005291081cd93b18489196346934d45e1f6d9b4ffc18677ef4bdba8e14510db
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# rails_options
|
2
2
|
> Rails options.
|
3
3
|
|
4
|
+
<p align="center">
|
5
|
+
<img src="https://tva1.sinaimg.cn/large/e6c9d24egy1h0ckupo97kj21cm0bmjtv.jpg" width="800" />
|
6
|
+
</p>
|
7
|
+
|
4
8
|
## installation
|
5
9
|
```shell
|
6
10
|
# add to Gemfile
|
@@ -13,4 +17,12 @@ gem install rails_options
|
|
13
17
|
```shell
|
14
18
|
# add migrations to app/db/migrations directory
|
15
19
|
rails g rails_options:install
|
20
|
+
```
|
21
|
+
|
22
|
+
## seeds
|
23
|
+
```rb
|
24
|
+
RailsOptions::Option.create(slug: 'site_title', value: '网站标题')
|
25
|
+
RailsOptions::Option.create(slug: 'site_slogan', value: '网站口号')
|
26
|
+
RailsOptions::Option.create(slug: 'site_description', value: '网站描述')
|
27
|
+
RailsOptions::Option.create(slug: 'site_keywords', value: 'php,python,java')
|
16
28
|
```
|
@@ -1,9 +1,8 @@
|
|
1
|
-
class
|
1
|
+
class CreateRailsOptions < ActiveRecord::Migration[6.1]
|
2
2
|
def change
|
3
3
|
create_table :rails_options do |t|
|
4
4
|
t.string :slug
|
5
|
-
t.
|
6
|
-
t.text :content
|
5
|
+
t.text :value
|
7
6
|
|
8
7
|
t.timestamps
|
9
8
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_options
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- afeiship
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|