adminka 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +150 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/config/adminka_manifest.js +2 -0
  6. data/app/assets/images/adminka/logo.png +0 -0
  7. data/app/assets/images/adminka/no-pic.jpg +0 -0
  8. data/app/assets/javascripts/adminka/application.js +28 -0
  9. data/app/assets/stylesheets/adminka/application.scss +21 -0
  10. data/app/controllers/adminka/admin_controller.rb +32 -0
  11. data/app/controllers/adminka/admins/registrations_controller.rb +61 -0
  12. data/app/controllers/adminka/admins/sessions_controller.rb +26 -0
  13. data/app/controllers/adminka/crud_controller.rb +60 -0
  14. data/app/helpers/adminka/application_helper.rb +10 -0
  15. data/app/jobs/adminka/application_job.rb +4 -0
  16. data/app/mailers/adminka/application_mailer.rb +6 -0
  17. data/app/models/adminka/admin.rb +14 -0
  18. data/app/models/adminka/application_record.rb +5 -0
  19. data/app/views/adminka/admin/index.html.haml +1 -0
  20. data/app/views/adminka/admins/confirmations/new.html.haml +10 -0
  21. data/app/views/adminka/admins/mailer/confirmation_instructions.html.haml +4 -0
  22. data/app/views/adminka/admins/mailer/password_change.html.haml +3 -0
  23. data/app/views/adminka/admins/mailer/reset_password_instructions.html.haml +6 -0
  24. data/app/views/adminka/admins/mailer/unlock_instructions.html.haml +5 -0
  25. data/app/views/adminka/admins/passwords/edit.html.haml +19 -0
  26. data/app/views/adminka/admins/passwords/new.html.haml +10 -0
  27. data/app/views/adminka/admins/registrations/edit.html.haml +44 -0
  28. data/app/views/adminka/admins/registrations/new.html.haml +29 -0
  29. data/app/views/adminka/admins/sessions/new.html.haml +17 -0
  30. data/app/views/adminka/admins/shared/_links.html.haml +19 -0
  31. data/app/views/adminka/admins/unlocks/new.html.haml +10 -0
  32. data/app/views/adminka/crud/edit.html.haml +17 -0
  33. data/app/views/adminka/crud/index.html.haml +36 -0
  34. data/app/views/adminka/crud/new.html.haml +17 -0
  35. data/app/views/adminka/crud/show.html.haml +18 -0
  36. data/app/views/adminka/form_fields/_check_box.html.haml +4 -0
  37. data/app/views/adminka/form_fields/_image.html.haml +6 -0
  38. data/app/views/adminka/form_fields/_radio.html.haml +11 -0
  39. data/app/views/adminka/form_fields/_select.html.haml +9 -0
  40. data/app/views/adminka/form_fields/_text.html.haml +4 -0
  41. data/app/views/adminka/form_fields/_textarea.html.haml +4 -0
  42. data/app/views/kaminari/bootstrap/_first_page.html.haml +2 -0
  43. data/app/views/kaminari/bootstrap/_gap.html.haml +2 -0
  44. data/app/views/kaminari/bootstrap/_last_page.html.haml +2 -0
  45. data/app/views/kaminari/bootstrap/_next_page.html.haml +2 -0
  46. data/app/views/kaminari/bootstrap/_page.html.haml +6 -0
  47. data/app/views/kaminari/bootstrap/_paginator.html.haml +11 -0
  48. data/app/views/kaminari/bootstrap/_prev_page.html.haml +2 -0
  49. data/app/views/layouts/adminka/admin.html.haml +57 -0
  50. data/app/views/layouts/adminka/auth.html.haml +28 -0
  51. data/config/initializers/devise.rb +276 -0
  52. data/config/locales/adminka.en.yml +14 -0
  53. data/config/locales/devise.en.yml +62 -0
  54. data/config/routes.rb +8 -0
  55. data/db/migrate/20161225073001_devise_create_adminka_admins.rb +45 -0
  56. data/lib/adminka.rb +11 -0
  57. data/lib/adminka/engine.rb +9 -0
  58. data/lib/adminka/staff.rb +11 -0
  59. data/lib/adminka/version.rb +3 -0
  60. data/lib/generators/adminka/controllers_generator.rb +12 -0
  61. data/lib/generators/adminka/locale_generator.rb +12 -0
  62. data/lib/generators/adminka/views_generator.rb +17 -0
  63. data/lib/tasks/adminka_tasks.rake +4 -0
  64. metadata +250 -0
@@ -0,0 +1,28 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title Adminka
5
+ = stylesheet_link_tag "adminka/application", media: "all"
6
+ = javascript_include_tag "adminka/application"
7
+ = csrf_meta_tags
8
+ %body
9
+ #top-nav.navbar.navbar-inverse.navbar-static-top
10
+ .container
11
+ .navbar-header
12
+ %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
13
+ %span.icon-toggle
14
+ = link_to adminka.root_path do
15
+ = image_tag 'adminka/logo.png'
16
+ .navbar-collapse.collapse
17
+ .container
18
+ .row
19
+ .col-sm-9
20
+ .row
21
+ - if notice
22
+ .alert.alert-success
23
+ #{notice}
24
+ - if alert
25
+ .alert.alert-warning
26
+ = alert
27
+ %div{align: 'center'}
28
+ = yield
@@ -0,0 +1,276 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # The secret key used by Devise. Devise uses this key to generate
5
+ # random tokens. Changing this key will render invalid all existing
6
+ # confirmation, reset password and unlock tokens in the database.
7
+ # Devise will use the `secret_key_base` as its `secret_key`
8
+ # by default. You can change it below and use your own secret key.
9
+ # config.secret_key = '68558965720fa559fbdb5208caf41f1534f4da47b2229b4570b11f6a2d44629c28dc5dc487a7dbc31d16c7887eb3b440317a26f450fc80db0b7c9ee6748520e0'
10
+
11
+ # ==> Mailer Configuration
12
+ # Configure the e-mail address which will be shown in Devise::Mailer,
13
+ # note that it will be overwritten if you use your own mailer class
14
+ # with default "from" parameter.
15
+ config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
16
+
17
+ # Configure the class responsible to send e-mails.
18
+ # config.mailer = 'Devise::Mailer'
19
+
20
+ # Configure the parent class responsible to send e-mails.
21
+ # config.parent_mailer = 'ActionMailer::Base'
22
+
23
+ config.parent_controller = 'Adminka::AdminController'
24
+
25
+ # ==> ORM configuration
26
+ # Load and configure the ORM. Supports :active_record (default) and
27
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
28
+ # available as additional gems.
29
+ require 'devise/orm/active_record'
30
+
31
+ # ==> Configuration for any authentication mechanism
32
+ # Configure which keys are used when authenticating a user. The default is
33
+ # just :email. You can configure it to use [:username, :subdomain], so for
34
+ # authenticating a user, both parameters are required. Remember that those
35
+ # parameters are used only when authenticating and not when retrieving from
36
+ # session. If you need permissions, you should implement that in a before filter.
37
+ # You can also supply a hash where the value is a boolean determining whether
38
+ # or not authentication should be aborted when the value is not present.
39
+ # config.authentication_keys = [:email]
40
+
41
+ # Configure parameters from the request object used for authentication. Each entry
42
+ # given should be a request method and it will automatically be passed to the
43
+ # find_for_authentication method and considered in your model lookup. For instance,
44
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
45
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
46
+ # config.request_keys = []
47
+
48
+ # Configure which authentication keys should be case-insensitive.
49
+ # These keys will be downcased upon creating or modifying a user and when used
50
+ # to authenticate or find a user. Default is :email.
51
+ config.case_insensitive_keys = [:email]
52
+
53
+ # Configure which authentication keys should have whitespace stripped.
54
+ # These keys will have whitespace before and after removed upon creating or
55
+ # modifying a user and when used to authenticate or find a user. Default is :email.
56
+ config.strip_whitespace_keys = [:email]
57
+
58
+ # Tell if authentication through request.params is enabled. True by default.
59
+ # It can be set to an array that will enable params authentication only for the
60
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
61
+ # enable it only for database (email + password) authentication.
62
+ # config.params_authenticatable = true
63
+
64
+ # Tell if authentication through HTTP Auth is enabled. False by default.
65
+ # It can be set to an array that will enable http authentication only for the
66
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
67
+ # enable it only for database authentication. The supported strategies are:
68
+ # :database = Support basic authentication with authentication key + password
69
+ # config.http_authenticatable = false
70
+
71
+ # If 401 status code should be returned for AJAX requests. True by default.
72
+ # config.http_authenticatable_on_xhr = true
73
+
74
+ # The realm used in Http Basic Authentication. 'Application' by default.
75
+ # config.http_authentication_realm = 'Application'
76
+
77
+ # It will change confirmation, password recovery and other workflows
78
+ # to behave the same regardless if the e-mail provided was right or wrong.
79
+ # Does not affect registerable.
80
+ # config.paranoid = true
81
+
82
+ # By default Devise will store the user in session. You can skip storage for
83
+ # particular strategies by setting this option.
84
+ # Notice that if you are skipping storage for all authentication paths, you
85
+ # may want to disable generating routes to Devise's sessions controller by
86
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
87
+ config.skip_session_storage = [:http_auth]
88
+
89
+ # By default, Devise cleans up the CSRF token on authentication to
90
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
91
+ # requests for sign in and sign up, you need to get a new CSRF token
92
+ # from the server. You can disable this option at your own risk.
93
+ # config.clean_up_csrf_token_on_authentication = true
94
+
95
+ # When false, Devise will not attempt to reload routes on eager load.
96
+ # This can reduce the time taken to boot the app but if your application
97
+ # requires the Devise mappings to be loaded during boot time the application
98
+ # won't boot properly.
99
+ # config.reload_routes = true
100
+
101
+ # ==> Configuration for :database_authenticatable
102
+ # For bcrypt, this is the cost for hashing the password and defaults to 11. If
103
+ # using other algorithms, it sets how many times you want the password to be hashed.
104
+ #
105
+ # Limiting the stretches to just one in testing will increase the performance of
106
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
107
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
108
+ # algorithm), the cost increases exponentially with the number of stretches (e.g.
109
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
110
+ config.stretches = Rails.env.test? ? 1 : 11
111
+
112
+ # Set up a pepper to generate the hashed password.
113
+ # config.pepper = 'bc3e5b6237197f629ba1df6f0a7193c303d2aa4b91048e9c7edd0ef8c482c80d63dd5b5019701925c7b4be9b0df69ce7c9d559f396ec94458dfa858bfcd0f9ab'
114
+
115
+ # Send a notification email when the user's password is changed
116
+ # config.send_password_change_notification = false
117
+
118
+ # ==> Configuration for :confirmable
119
+ # A period that the user is allowed to access the website even without
120
+ # confirming their account. For instance, if set to 2.days, the user will be
121
+ # able to access the website for two days without confirming their account,
122
+ # access will be blocked just in the third day. Default is 0.days, meaning
123
+ # the user cannot access the website without confirming their account.
124
+ # config.allow_unconfirmed_access_for = 2.days
125
+
126
+ # A period that the user is allowed to confirm their account before their
127
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
128
+ # their account within 3 days after the mail was sent, but on the fourth day
129
+ # their account can't be confirmed with the token any more.
130
+ # Default is nil, meaning there is no restriction on how long a user can take
131
+ # before confirming their account.
132
+ # config.confirm_within = 3.days
133
+
134
+ # If true, requires any email changes to be confirmed (exactly the same way as
135
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
136
+ # db field (see migrations). Until confirmed, new email is stored in
137
+ # unconfirmed_email column, and copied to email column on successful confirmation.
138
+ config.reconfirmable = true
139
+
140
+ # Defines which key will be used when confirming an account
141
+ # config.confirmation_keys = [:email]
142
+
143
+ # ==> Configuration for :rememberable
144
+ # The time the user will be remembered without asking for credentials again.
145
+ # config.remember_for = 2.weeks
146
+
147
+ # Invalidates all the remember me tokens when the user signs out.
148
+ config.expire_all_remember_me_on_sign_out = true
149
+
150
+ # If true, extends the user's remember period when remembered via cookie.
151
+ # config.extend_remember_period = false
152
+
153
+ # Options to be passed to the created cookie. For instance, you can set
154
+ # secure: true in order to force SSL only cookies.
155
+ # config.rememberable_options = {}
156
+
157
+ # ==> Configuration for :validatable
158
+ # Range for password length.
159
+ config.password_length = 6..128
160
+
161
+ # Email regex used to validate email formats. It simply asserts that
162
+ # one (and only one) @ exists in the given string. This is mainly
163
+ # to give user feedback and not to assert the e-mail validity.
164
+ config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
165
+
166
+ # ==> Configuration for :timeoutable
167
+ # The time you want to timeout the user session without activity. After this
168
+ # time the user will be asked for credentials again. Default is 30 minutes.
169
+ # config.timeout_in = 30.minutes
170
+
171
+ # ==> Configuration for :lockable
172
+ # Defines which strategy will be used to lock an account.
173
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
174
+ # :none = No lock strategy. You should handle locking by yourself.
175
+ # config.lock_strategy = :failed_attempts
176
+
177
+ # Defines which key will be used when locking and unlocking an account
178
+ # config.unlock_keys = [:email]
179
+
180
+ # Defines which strategy will be used to unlock an account.
181
+ # :email = Sends an unlock link to the user email
182
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
183
+ # :both = Enables both strategies
184
+ # :none = No unlock strategy. You should handle unlocking by yourself.
185
+ # config.unlock_strategy = :both
186
+
187
+ # Number of authentication tries before locking an account if lock_strategy
188
+ # is failed attempts.
189
+ # config.maximum_attempts = 20
190
+
191
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
192
+ # config.unlock_in = 1.hour
193
+
194
+ # Warn on the last attempt before the account is locked.
195
+ # config.last_attempt_warning = true
196
+
197
+ # ==> Configuration for :recoverable
198
+ #
199
+ # Defines which key will be used when recovering the password for an account
200
+ # config.reset_password_keys = [:email]
201
+
202
+ # Time interval you can reset your password with a reset password key.
203
+ # Don't put a too small interval or your users won't have the time to
204
+ # change their passwords.
205
+ config.reset_password_within = 6.hours
206
+
207
+ # When set to false, does not sign a user in automatically after their password is
208
+ # reset. Defaults to true, so a user is signed in automatically after a reset.
209
+ # config.sign_in_after_reset_password = true
210
+
211
+ # ==> Configuration for :encryptable
212
+ # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
213
+ # You can use :sha1, :sha512 or algorithms from others authentication tools as
214
+ # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
215
+ # for default behavior) and :restful_authentication_sha1 (then you should set
216
+ # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
217
+ #
218
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
219
+ # config.encryptor = :sha512
220
+
221
+ # ==> Scopes configuration
222
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
223
+ # "users/sessions/new". It's turned off by default because it's slower if you
224
+ # are using only default views.
225
+ # config.scoped_views = false
226
+
227
+ # Configure the default scope given to Warden. By default it's the first
228
+ # devise role declared in your routes (usually :user).
229
+ # config.default_scope = :user
230
+
231
+ # Set this configuration to false if you want /users/sign_out to sign out
232
+ # only the current scope. By default, Devise signs out all scopes.
233
+ # config.sign_out_all_scopes = true
234
+
235
+ # ==> Navigation configuration
236
+ # Lists the formats that should be treated as navigational. Formats like
237
+ # :html, should redirect to the sign in page when the user does not have
238
+ # access, but formats like :xml or :json, should return 401.
239
+ #
240
+ # If you have any extra navigational formats, like :iphone or :mobile, you
241
+ # should add them to the navigational formats lists.
242
+ #
243
+ # The "*/*" below is required to match Internet Explorer requests.
244
+ # config.navigational_formats = ['*/*', :html]
245
+
246
+ # The default HTTP method used to sign out a resource. Default is :delete.
247
+ config.sign_out_via = :delete
248
+
249
+ # ==> OmniAuth
250
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
251
+ # up on your models and hooks.
252
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
253
+
254
+ # ==> Warden configuration
255
+ # If you want to use other strategies, that are not supported by Devise, or
256
+ # change the failure app, you can configure them inside the config.warden block.
257
+ #
258
+ # config.warden do |manager|
259
+ # manager.intercept_401 = false
260
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
261
+ # end
262
+
263
+ # ==> Mountable engine configurations
264
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
265
+ # is mountable, there are some extra configurations to be taken into account.
266
+ # The following options are available, assuming the engine is mounted as:
267
+ #
268
+ # mount MyEngine, at: '/my_engine'
269
+ #
270
+ # The router that invoked `devise_for`, in the example above, would be:
271
+ config.router_name = :adminka
272
+ #
273
+ # When using OmniAuth, Devise cannot automatically set OmniAuth path,
274
+ # so you need to do it manually. For the users scope, it would be:
275
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
276
+ end
@@ -0,0 +1,14 @@
1
+ en:
2
+ adminka:
3
+ create: 'Item successfully created!'
4
+ update: 'Item successfully updated!'
5
+ delete: 'Item successfully deleted!'
6
+ activate_acc: 'You need to activate account to proceed!'
7
+ menu: 'Menu'
8
+ actions: 'Actions'
9
+ back: 'Back'
10
+ clear: 'Clear filter'
11
+ add: 'Add %{item}'
12
+ confirm: 'Are you sure?'
13
+ profile: 'My profile'
14
+ logout: 'Logout'
@@ -0,0 +1,62 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid %{authentication_keys} or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid %{authentication_keys} or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your email address before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock instructions"
26
+ password_change:
27
+ subject: "Password Changed"
28
+ omniauth_callbacks:
29
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
30
+ success: "Successfully authenticated from %{kind} account."
31
+ passwords:
32
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
33
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
34
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
35
+ updated: "Your password has been changed successfully. You are now signed in."
36
+ updated_not_active: "Your password has been changed successfully."
37
+ registrations:
38
+ destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
39
+ signed_up: "Welcome! You have signed up successfully."
40
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
41
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
42
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
43
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
44
+ updated: "Your account has been updated successfully."
45
+ sessions:
46
+ signed_in: "Signed in successfully."
47
+ signed_out: "Signed out successfully."
48
+ already_signed_out: "Signed out successfully."
49
+ unlocks:
50
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
51
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
52
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
53
+ errors:
54
+ messages:
55
+ already_confirmed: "was already confirmed, please try signing in"
56
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
57
+ expired: "has expired, please request a new one"
58
+ not_found: "not found"
59
+ not_locked: "was not locked"
60
+ not_saved:
61
+ one: "1 error prohibited this %{resource} from being saved:"
62
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -0,0 +1,8 @@
1
+ Adminka::Engine.routes.draw do
2
+ devise_for :admins, class_name: "Adminka::Admin", controllers: {
3
+ registrations: 'adminka/admins/registrations',
4
+ sessions: 'adminka/admins/sessions',
5
+ }
6
+
7
+ root 'admin#index'
8
+ end
@@ -0,0 +1,45 @@
1
+ class DeviseCreateAdminkaAdmins < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :adminka_admins do |t|
4
+ ## Database authenticatable
5
+ t.string :first_name
6
+ t.string :last_name
7
+ t.boolean :is_active, default: false
8
+ t.string :email, null: false, default: ""
9
+ t.string :encrypted_password, null: false, default: ""
10
+
11
+ ## Recoverable
12
+ # t.string :reset_password_token
13
+ # t.datetime :reset_password_sent_at
14
+
15
+ ## Rememberable
16
+ t.datetime :remember_created_at
17
+
18
+ ## Trackable
19
+ t.integer :sign_in_count, default: 0, null: false
20
+ t.datetime :current_sign_in_at
21
+ t.datetime :last_sign_in_at
22
+ t.string :current_sign_in_ip
23
+ t.string :last_sign_in_ip
24
+
25
+ ## Confirmable
26
+ # t.string :confirmation_token
27
+ # t.datetime :confirmed_at
28
+ # t.datetime :confirmation_sent_at
29
+ # t.string :unconfirmed_email # Only if using reconfirmable
30
+
31
+ ## Lockable
32
+ # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
33
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
34
+ # t.datetime :locked_at
35
+
36
+
37
+ t.timestamps null: false
38
+ end
39
+
40
+ add_index :adminka_admins, :email, unique: true
41
+ # add_index :adminka_admins, :reset_password_token, unique: true
42
+ # add_index :adminka_admins, :confirmation_token, unique: true
43
+ # add_index :adminka_admins, :unlock_token, unique: true
44
+ end
45
+ end
@@ -0,0 +1,11 @@
1
+ require "adminka/engine"
2
+ require "bootstrap-sass"
3
+ require "jquery-rails"
4
+ require "haml"
5
+ require "adminka/staff"
6
+ require "kaminari"
7
+ require "ransack"
8
+ require "devise"
9
+
10
+ module Adminka
11
+ end