admin_invitable 0.1.0 → 1.0.0
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 +5 -5
- data/MIT-LICENSE +18 -17
- data/lib/admin_invitable/engine.rb +1 -2
- data/lib/admin_invitable/version.rb +1 -1
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/admin/admin_users.rb +1 -3
- data/spec/dummy/app/admin/dashboard.rb +2 -3
- data/spec/dummy/app/assets/config/manifest.js +2 -0
- data/spec/dummy/app/assets/javascripts/active_admin.js +1 -0
- data/spec/dummy/app/assets/stylesheets/{active_admin.css.scss → active_admin.scss} +3 -3
- data/spec/dummy/app/assets/stylesheets/application.css +5 -5
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +1 -1
- data/spec/dummy/app/javascript/packs/application.js +15 -0
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/admin_user.rb +2 -2
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +10 -9
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/rails +3 -3
- data/spec/dummy/bin/rake +2 -2
- data/spec/dummy/bin/setup +33 -0
- data/spec/dummy/config.ru +3 -1
- data/spec/dummy/config/application.rb +12 -13
- data/spec/dummy/config/boot.rb +3 -3
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +2 -2
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/development.rb +56 -12
- data/spec/dummy/config/environments/production.rb +65 -23
- data/spec/dummy/config/environments/test.rb +29 -9
- data/spec/dummy/config/initializers/active_admin.rb +106 -4
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +6 -2
- data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
- data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -1
- data/spec/dummy/config/initializers/devise.rb +94 -32
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
- data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/spec/dummy/config/locales/devise.en.yml +7 -2
- data/spec/dummy/config/locales/devise_invitable.en.yml +9 -1
- data/spec/dummy/config/locales/en.yml +11 -1
- data/spec/dummy/config/puma.rb +43 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/db/migrate/{20150410143721_devise_create_admin_users.rb → 20210618143445_devise_create_admin_users.rb} +9 -13
- data/spec/dummy/db/migrate/{20150410143725_create_active_admin_comments.rb → 20210618143451_create_active_admin_comments.rb} +2 -5
- data/spec/dummy/db/migrate/{20150410152955_devise_invitable_add_to_admin_users.rb → 20210618143525_devise_invitable_add_to_admin_users.rb} +4 -9
- data/spec/dummy/db/schema.rb +34 -42
- data/spec/dummy/public/404.html +6 -6
- data/spec/dummy/public/422.html +6 -6
- data/spec/dummy/public/500.html +6 -6
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/spec/factories/admin_users.rb +3 -3
- data/spec/dummy/spec/models/admin_user_spec.rb +7 -0
- data/spec/rails_helper.rb +6 -4
- metadata +116 -61
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +0 -464
@@ -1,4 +1,6 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
3
|
# Configure sensitive parameters which will be filtered from the log file.
|
4
|
-
Rails.application.config.filter_parameters += [
|
4
|
+
Rails.application.config.filter_parameters += [
|
5
|
+
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
6
|
+
]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Define an application-wide HTTP permissions policy. For further
|
2
|
+
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
3
|
+
#
|
4
|
+
# Rails.application.config.permissions_policy do |f|
|
5
|
+
# f.camera :none
|
6
|
+
# f.gyroscope :none
|
7
|
+
# f.microphone :none
|
8
|
+
# f.usb :none
|
9
|
+
# f.fullscreen :self
|
10
|
+
# f.payment :self, "https://secure.example.com"
|
11
|
+
# end
|
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
7
|
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
8
|
+
wrap_parameters format: [:json]
|
9
9
|
end
|
10
10
|
|
11
11
|
# To enable root element in JSON for ActiveRecord objects.
|
12
12
|
# ActiveSupport.on_load(:active_record) do
|
13
|
-
#
|
13
|
+
# self.include_root_in_json = true
|
14
14
|
# end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Additional translations at https://github.com/
|
1
|
+
# Additional translations at https://github.com/heartcombo/devise/wiki/I18n
|
2
2
|
|
3
3
|
en:
|
4
4
|
devise:
|
@@ -23,6 +23,10 @@ en:
|
|
23
23
|
subject: "Reset password instructions"
|
24
24
|
unlock_instructions:
|
25
25
|
subject: "Unlock instructions"
|
26
|
+
email_changed:
|
27
|
+
subject: "Email Changed"
|
28
|
+
password_change:
|
29
|
+
subject: "Password Changed"
|
26
30
|
omniauth_callbacks:
|
27
31
|
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
28
32
|
success: "Successfully authenticated from %{kind} account."
|
@@ -38,8 +42,9 @@ en:
|
|
38
42
|
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
39
43
|
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
40
44
|
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."
|
41
|
-
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the
|
45
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirmation link to confirm your new email address."
|
42
46
|
updated: "Your account has been updated successfully."
|
47
|
+
updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again."
|
43
48
|
sessions:
|
44
49
|
signed_in: "Signed in successfully."
|
45
50
|
signed_out: "Signed out successfully."
|
@@ -6,6 +6,7 @@ en:
|
|
6
6
|
send_instructions: "An invitation email has been sent to %{email}."
|
7
7
|
invitation_token_invalid: "The invitation token provided is not valid!"
|
8
8
|
updated: "Your password was set successfully. You are now signed in."
|
9
|
+
updated_not_active: "Your password was set successfully."
|
9
10
|
no_invitations_remaining: "No invitations remaining"
|
10
11
|
invitation_removed: "Your invitation was removed."
|
11
12
|
new:
|
@@ -20,4 +21,11 @@ en:
|
|
20
21
|
hello: "Hello %{email}"
|
21
22
|
someone_invited_you: "Someone has invited you to %{url}, you can accept it through the link below."
|
22
23
|
accept: "Accept invitation"
|
23
|
-
|
24
|
+
accept_until: "This invitation will be due in %{due_date}."
|
25
|
+
ignore: "If you don't want to accept the invitation, please ignore this email. Your account won't be created until you access the link above and set your password."
|
26
|
+
time:
|
27
|
+
formats:
|
28
|
+
devise:
|
29
|
+
mailer:
|
30
|
+
invitation_instructions:
|
31
|
+
accept_until_format: "%B %d, %Y %I:%M %p"
|
@@ -16,8 +16,18 @@
|
|
16
16
|
#
|
17
17
|
# This would use the information in config/locales/es.yml.
|
18
18
|
#
|
19
|
+
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
+
# the default I18n backend:
|
21
|
+
#
|
22
|
+
# true, false, on, off, yes, no
|
23
|
+
#
|
24
|
+
# Instead, surround them with single quotes.
|
25
|
+
#
|
26
|
+
# en:
|
27
|
+
# 'true': 'foo'
|
28
|
+
#
|
19
29
|
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at
|
30
|
+
# available at https://guides.rubyonrails.org/i18n.html.
|
21
31
|
|
22
32
|
en:
|
23
33
|
hello: "Hello world"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Puma can serve each request in a thread from an internal thread pool.
|
2
|
+
# The `threads` method setting takes two numbers: a minimum and maximum.
|
3
|
+
# Any libraries that use thread pools should be configured to match
|
4
|
+
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
|
+
# and maximum; this matches the default thread size of Active Record.
|
6
|
+
#
|
7
|
+
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
8
|
+
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
9
|
+
threads min_threads_count, max_threads_count
|
10
|
+
|
11
|
+
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
12
|
+
# terminating a worker in development environments.
|
13
|
+
#
|
14
|
+
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
15
|
+
|
16
|
+
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
17
|
+
#
|
18
|
+
port ENV.fetch("PORT") { 3000 }
|
19
|
+
|
20
|
+
# Specifies the `environment` that Puma will run in.
|
21
|
+
#
|
22
|
+
environment ENV.fetch("RAILS_ENV") { "development" }
|
23
|
+
|
24
|
+
# Specifies the `pidfile` that Puma will use.
|
25
|
+
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
26
|
+
|
27
|
+
# Specifies the number of `workers` to boot in clustered mode.
|
28
|
+
# Workers are forked web server processes. If using threads and workers together
|
29
|
+
# the concurrency of the application would be max `threads` * `workers`.
|
30
|
+
# Workers do not work on JRuby or Windows (both of which do not support
|
31
|
+
# processes).
|
32
|
+
#
|
33
|
+
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
34
|
+
|
35
|
+
# Use the `preload_app!` method when specifying a `workers` number.
|
36
|
+
# This directive tells Puma to first boot the application and load code
|
37
|
+
# before forking the application. This takes advantage of Copy On Write
|
38
|
+
# process behavior so workers use less memory.
|
39
|
+
#
|
40
|
+
# preload_app!
|
41
|
+
|
42
|
+
# Allow puma to be restarted by `rails restart` command.
|
43
|
+
plugin :tmp_restart
|
@@ -0,0 +1,34 @@
|
|
1
|
+
test:
|
2
|
+
service: Disk
|
3
|
+
root: <%= Rails.root.join("tmp/storage") %>
|
4
|
+
|
5
|
+
local:
|
6
|
+
service: Disk
|
7
|
+
root: <%= Rails.root.join("storage") %>
|
8
|
+
|
9
|
+
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
10
|
+
# amazon:
|
11
|
+
# service: S3
|
12
|
+
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
13
|
+
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
14
|
+
# region: us-east-1
|
15
|
+
# bucket: your_own_bucket
|
16
|
+
|
17
|
+
# Remember not to checkin your GCS keyfile to a repository
|
18
|
+
# google:
|
19
|
+
# service: GCS
|
20
|
+
# project: your_project
|
21
|
+
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
22
|
+
# bucket: your_own_bucket
|
23
|
+
|
24
|
+
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
25
|
+
# microsoft:
|
26
|
+
# service: AzureStorage
|
27
|
+
# storage_account_name: your_account_name
|
28
|
+
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
29
|
+
# container: your_container_name
|
30
|
+
|
31
|
+
# mirror:
|
32
|
+
# service: Mirror
|
33
|
+
# primary: local
|
34
|
+
# mirrors: [ amazon, google, microsoft ]
|
@@ -1,12 +1,8 @@
|
|
1
|
-
|
2
|
-
def migrate(direction)
|
3
|
-
super
|
4
|
-
# Create a default user
|
5
|
-
AdminUser.create!(email: 'admin@example.com', password: 'password', password_confirmation: 'password') if direction == :up
|
6
|
-
end
|
1
|
+
# frozen_string_literal: true
|
7
2
|
|
3
|
+
class DeviseCreateAdminUsers < ActiveRecord::Migration[6.1]
|
8
4
|
def change
|
9
|
-
create_table
|
5
|
+
create_table :admin_users do |t|
|
10
6
|
## Database authenticatable
|
11
7
|
t.string :email, null: false, default: ""
|
12
8
|
t.string :encrypted_password, null: false, default: ""
|
@@ -19,11 +15,11 @@ class DeviseCreateAdminUsers < ActiveRecord::Migration
|
|
19
15
|
t.datetime :remember_created_at
|
20
16
|
|
21
17
|
## Trackable
|
22
|
-
t.integer :sign_in_count, default: 0, null: false
|
23
|
-
t.datetime :current_sign_in_at
|
24
|
-
t.datetime :last_sign_in_at
|
25
|
-
t.string :current_sign_in_ip
|
26
|
-
t.string :last_sign_in_ip
|
18
|
+
# t.integer :sign_in_count, default: 0, null: false
|
19
|
+
# t.datetime :current_sign_in_at
|
20
|
+
# t.datetime :last_sign_in_at
|
21
|
+
# t.string :current_sign_in_ip
|
22
|
+
# t.string :last_sign_in_ip
|
27
23
|
|
28
24
|
## Confirmable
|
29
25
|
# t.string :confirmation_token
|
@@ -37,7 +33,7 @@ class DeviseCreateAdminUsers < ActiveRecord::Migration
|
|
37
33
|
# t.datetime :locked_at
|
38
34
|
|
39
35
|
|
40
|
-
t.timestamps
|
36
|
+
t.timestamps null: false
|
41
37
|
end
|
42
38
|
|
43
39
|
add_index :admin_users, :email, unique: true
|
@@ -1,16 +1,13 @@
|
|
1
|
-
class CreateActiveAdminComments < ActiveRecord::Migration
|
1
|
+
class CreateActiveAdminComments < ActiveRecord::Migration[6.1]
|
2
2
|
def self.up
|
3
3
|
create_table :active_admin_comments do |t|
|
4
4
|
t.string :namespace
|
5
5
|
t.text :body
|
6
|
-
t.
|
7
|
-
t.string :resource_type, null: false
|
6
|
+
t.references :resource, polymorphic: true
|
8
7
|
t.references :author, polymorphic: true
|
9
8
|
t.timestamps
|
10
9
|
end
|
11
10
|
add_index :active_admin_comments, [:namespace]
|
12
|
-
add_index :active_admin_comments, [:author_type, :author_id]
|
13
|
-
add_index :active_admin_comments, [:resource_type, :resource_id]
|
14
11
|
end
|
15
12
|
|
16
13
|
def self.down
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class DeviseInvitableAddToAdminUsers < ActiveRecord::Migration
|
1
|
+
class DeviseInvitableAddToAdminUsers < ActiveRecord::Migration[6.1]
|
2
2
|
def up
|
3
3
|
change_table :admin_users do |t|
|
4
4
|
t.string :invitation_token
|
@@ -6,22 +6,17 @@ class DeviseInvitableAddToAdminUsers < ActiveRecord::Migration
|
|
6
6
|
t.datetime :invitation_sent_at
|
7
7
|
t.datetime :invitation_accepted_at
|
8
8
|
t.integer :invitation_limit
|
9
|
-
t.references :invited_by, :
|
9
|
+
t.references :invited_by, polymorphic: true
|
10
10
|
t.integer :invitations_count, default: 0
|
11
|
-
t.index :
|
12
|
-
t.index :invitation_token, :unique => true # for invitable
|
11
|
+
t.index :invitation_token, unique: true # for invitable
|
13
12
|
t.index :invited_by_id
|
14
13
|
end
|
15
|
-
|
16
|
-
# And allow null encrypted_password and password_salt:
|
17
|
-
change_column_null :admin_users, :encrypted_password, true
|
18
14
|
end
|
19
15
|
|
20
16
|
def down
|
21
17
|
change_table :admin_users do |t|
|
22
|
-
t.remove_references :invited_by, :
|
18
|
+
t.remove_references :invited_by, polymorphic: true
|
23
19
|
t.remove :invitations_count, :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token, :invitation_created_at
|
24
20
|
end
|
25
|
-
change_column_null :admin_users, :encrypted_password, false
|
26
21
|
end
|
27
22
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -1,60 +1,52 @@
|
|
1
|
-
# encoding: UTF-8
|
2
1
|
# This file is auto-generated from the current state of the database. Instead
|
3
2
|
# of editing this file, please use the migrations feature of Active Record to
|
4
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
5
4
|
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# from scratch.
|
10
|
-
#
|
5
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
|
+
# be faster and is potentially less error prone than running all of your
|
8
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
+
# migrations use external dependencies or application code.
|
11
10
|
#
|
12
11
|
# It's strongly recommended that you check this file into your version control system.
|
13
12
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2021_06_18_143525) do
|
15
14
|
|
16
|
-
create_table "active_admin_comments", force:
|
17
|
-
t.string
|
18
|
-
t.text
|
19
|
-
t.string
|
20
|
-
t.
|
21
|
-
t.
|
22
|
-
t.
|
23
|
-
t.datetime "created_at"
|
24
|
-
t.datetime "updated_at"
|
15
|
+
create_table "active_admin_comments", force: :cascade do |t|
|
16
|
+
t.string "namespace"
|
17
|
+
t.text "body"
|
18
|
+
t.string "resource_type"
|
19
|
+
t.integer "resource_id"
|
20
|
+
t.string "author_type"
|
21
|
+
t.integer "author_id"
|
22
|
+
t.datetime "created_at", precision: 6, null: false
|
23
|
+
t.datetime "updated_at", precision: 6, null: false
|
24
|
+
t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author"
|
25
|
+
t.index ["namespace"], name: "index_active_admin_comments_on_namespace"
|
26
|
+
t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource"
|
25
27
|
end
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
create_table "admin_users", force: true do |t|
|
32
|
-
t.string "email", default: "", null: false
|
33
|
-
t.string "encrypted_password", default: ""
|
34
|
-
t.string "reset_password_token"
|
29
|
+
create_table "admin_users", force: :cascade do |t|
|
30
|
+
t.string "email", default: "", null: false
|
31
|
+
t.string "encrypted_password", default: "", null: false
|
32
|
+
t.string "reset_password_token"
|
35
33
|
t.datetime "reset_password_sent_at"
|
36
34
|
t.datetime "remember_created_at"
|
37
|
-
t.
|
38
|
-
t.datetime "
|
39
|
-
t.
|
40
|
-
t.string "current_sign_in_ip"
|
41
|
-
t.string "last_sign_in_ip"
|
42
|
-
t.datetime "created_at"
|
43
|
-
t.datetime "updated_at"
|
44
|
-
t.string "invitation_token"
|
35
|
+
t.datetime "created_at", precision: 6, null: false
|
36
|
+
t.datetime "updated_at", precision: 6, null: false
|
37
|
+
t.string "invitation_token"
|
45
38
|
t.datetime "invitation_created_at"
|
46
39
|
t.datetime "invitation_sent_at"
|
47
40
|
t.datetime "invitation_accepted_at"
|
48
|
-
t.integer
|
49
|
-
t.
|
50
|
-
t.
|
51
|
-
t.integer
|
41
|
+
t.integer "invitation_limit"
|
42
|
+
t.string "invited_by_type"
|
43
|
+
t.integer "invited_by_id"
|
44
|
+
t.integer "invitations_count", default: 0
|
45
|
+
t.index ["email"], name: "index_admin_users_on_email", unique: true
|
46
|
+
t.index ["invitation_token"], name: "index_admin_users_on_invitation_token", unique: true
|
47
|
+
t.index ["invited_by_id"], name: "index_admin_users_on_invited_by_id"
|
48
|
+
t.index ["invited_by_type", "invited_by_id"], name: "index_admin_users_on_invited_by"
|
49
|
+
t.index ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true
|
52
50
|
end
|
53
51
|
|
54
|
-
add_index "admin_users", ["email"], name: "index_admin_users_on_email", unique: true
|
55
|
-
add_index "admin_users", ["invitation_token"], name: "index_admin_users_on_invitation_token", unique: true
|
56
|
-
add_index "admin_users", ["invitations_count"], name: "index_admin_users_on_invitations_count"
|
57
|
-
add_index "admin_users", ["invited_by_id"], name: "index_admin_users_on_invited_by_id"
|
58
|
-
add_index "admin_users", ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true
|
59
|
-
|
60
52
|
end
|
data/spec/dummy/public/404.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<title>The page you were looking for doesn't exist (404)</title>
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
6
|
<style>
|
7
|
-
|
7
|
+
.rails-default-error-page {
|
8
8
|
background-color: #EFEFEF;
|
9
9
|
color: #2E2F30;
|
10
10
|
text-align: center;
|
@@ -12,13 +12,13 @@
|
|
12
12
|
margin: 0;
|
13
13
|
}
|
14
14
|
|
15
|
-
div.dialog {
|
15
|
+
.rails-default-error-page div.dialog {
|
16
16
|
width: 95%;
|
17
17
|
max-width: 33em;
|
18
18
|
margin: 4em auto 0;
|
19
19
|
}
|
20
20
|
|
21
|
-
div.dialog > div {
|
21
|
+
.rails-default-error-page div.dialog > div {
|
22
22
|
border: 1px solid #CCC;
|
23
23
|
border-right-color: #999;
|
24
24
|
border-left-color: #999;
|
@@ -31,13 +31,13 @@
|
|
31
31
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
32
|
}
|
33
33
|
|
34
|
-
h1 {
|
34
|
+
.rails-default-error-page h1 {
|
35
35
|
font-size: 100%;
|
36
36
|
color: #730E15;
|
37
37
|
line-height: 1.5em;
|
38
38
|
}
|
39
39
|
|
40
|
-
div.dialog > p {
|
40
|
+
.rails-default-error-page div.dialog > p {
|
41
41
|
margin: 0 0 1em;
|
42
42
|
padding: 1em;
|
43
43
|
background-color: #F7F7F7;
|
@@ -54,7 +54,7 @@
|
|
54
54
|
</style>
|
55
55
|
</head>
|
56
56
|
|
57
|
-
<body>
|
57
|
+
<body class="rails-default-error-page">
|
58
58
|
<!-- This file lives in public/404.html -->
|
59
59
|
<div class="dialog">
|
60
60
|
<div>
|
data/spec/dummy/public/422.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<title>The change you wanted was rejected (422)</title>
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
6
|
<style>
|
7
|
-
|
7
|
+
.rails-default-error-page {
|
8
8
|
background-color: #EFEFEF;
|
9
9
|
color: #2E2F30;
|
10
10
|
text-align: center;
|
@@ -12,13 +12,13 @@
|
|
12
12
|
margin: 0;
|
13
13
|
}
|
14
14
|
|
15
|
-
div.dialog {
|
15
|
+
.rails-default-error-page div.dialog {
|
16
16
|
width: 95%;
|
17
17
|
max-width: 33em;
|
18
18
|
margin: 4em auto 0;
|
19
19
|
}
|
20
20
|
|
21
|
-
div.dialog > div {
|
21
|
+
.rails-default-error-page div.dialog > div {
|
22
22
|
border: 1px solid #CCC;
|
23
23
|
border-right-color: #999;
|
24
24
|
border-left-color: #999;
|
@@ -31,13 +31,13 @@
|
|
31
31
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
32
|
}
|
33
33
|
|
34
|
-
h1 {
|
34
|
+
.rails-default-error-page h1 {
|
35
35
|
font-size: 100%;
|
36
36
|
color: #730E15;
|
37
37
|
line-height: 1.5em;
|
38
38
|
}
|
39
39
|
|
40
|
-
div.dialog > p {
|
40
|
+
.rails-default-error-page div.dialog > p {
|
41
41
|
margin: 0 0 1em;
|
42
42
|
padding: 1em;
|
43
43
|
background-color: #F7F7F7;
|
@@ -54,7 +54,7 @@
|
|
54
54
|
</style>
|
55
55
|
</head>
|
56
56
|
|
57
|
-
<body>
|
57
|
+
<body class="rails-default-error-page">
|
58
58
|
<!-- This file lives in public/422.html -->
|
59
59
|
<div class="dialog">
|
60
60
|
<div>
|