lotus_admin 1.0.0 → 1.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7654d4a6375e34d5e2b58abff7c19c3e16721b4518ada9b5f84ccfe955838f95
|
4
|
+
data.tar.gz: 828b1e84b78a6b828c4b5f503d4205d14732064e145c343630c49aca4e440dea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d288f6e13b189d0b63af5ba153caffc5e4e3a8a86d64920cc0b9315e661bc781d61e01dd0e48b17bfcdd601c08a302485c56f5832a0b5bc3bdc04c95b20b92f2
|
7
|
+
data.tar.gz: 27425031f367f49b0b35946bc11a276ecd139ed560f1825d23a2f6c0e2db9968a4745917badacd58ebd803bfee4bd28c225eff87f688245ed8aa6ee697923b6b
|
data/README.md
CHANGED
@@ -74,6 +74,13 @@ LotusAdmin.configure do |config|
|
|
74
74
|
end
|
75
75
|
```
|
76
76
|
|
77
|
+
### Custom User Class
|
78
|
+
You can choose to use a table pre-existing (with some columns added) or make use of the default schema when adding to your project for the first time.
|
79
|
+
|
80
|
+
If wanting to use a custom class and table name, but with the provided migration, just simply add the gem and then provide the initializer configuration before running migrations. You'll need to also define the model.
|
81
|
+
|
82
|
+
Otherwise if the table already exists, it won't be touched.
|
83
|
+
|
77
84
|
## Contributing
|
78
85
|
Contribution directions go here.
|
79
86
|
|
@@ -1,8 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class DeviseCreateLotusAdminUsers < ActiveRecord::Migration[5.1]
|
4
|
-
def
|
5
|
-
|
4
|
+
def up
|
5
|
+
return if table_exists?(LotusAdmin.configuration.user_class.table_name)
|
6
|
+
|
7
|
+
create_table LotusAdmin.configuration.user_class.table_name do |t|
|
6
8
|
## Database authenticatable
|
7
9
|
t.string :email, null: false, default: ""
|
8
10
|
t.string :encrypted_password, null: false, default: ""
|
@@ -34,13 +36,18 @@ class DeviseCreateLotusAdminUsers < ActiveRecord::Migration[5.1]
|
|
34
36
|
|
35
37
|
t.string :first_name, null: false
|
36
38
|
t.string :last_name, null: false
|
39
|
+
t.string :time_zone, null: false, default: 'Eastern Time (US & Canada)'
|
37
40
|
|
38
41
|
t.timestamps null: false
|
42
|
+
|
43
|
+
t.index :email, unique: true
|
44
|
+
t.index :reset_password_token, unique: true
|
45
|
+
t.index :confirmation_token, unique: true
|
46
|
+
# t.index :unlock_token, unique: true
|
39
47
|
end
|
48
|
+
end
|
40
49
|
|
41
|
-
|
42
|
-
|
43
|
-
add_index :lotus_admin_users, :confirmation_token, unique: true
|
44
|
-
# add_index :lotus_admin_users, :unlock_token, unique: true
|
50
|
+
def down
|
51
|
+
drop_table LotusAdmin.configuration.user_class.table_name
|
45
52
|
end
|
46
53
|
end
|
data/lib/lotus_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lotus_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Millsaps-Brewer
|
@@ -430,8 +430,7 @@ files:
|
|
430
430
|
- config/locales/simple_form.en.yml
|
431
431
|
- config/locales/users.en.yml
|
432
432
|
- config/routes.rb
|
433
|
-
- db/migrate/
|
434
|
-
- db/migrate/20180228210938_add_timezone_to_users.rb
|
433
|
+
- db/migrate/20180228210938_devise_create_lotus_admin_users.rb
|
435
434
|
- lib/lotus_admin.rb
|
436
435
|
- lib/lotus_admin/configuration.rb
|
437
436
|
- lib/lotus_admin/engine.rb
|