tb_inquiries 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.markdown +76 -0
  4. data/Rakefile +28 -0
  5. data/app/assets/images/spud/admin/contacts_thumb.png +0 -0
  6. data/app/assets/javascripts/spud/admin/inquiries.js +8 -0
  7. data/app/assets/javascripts/spud/inquiries/sitemaps.js +2 -0
  8. data/app/assets/stylesheets/spud/admin/inquiries.css +4 -0
  9. data/app/assets/stylesheets/spud/inquiries/sitemaps.css +4 -0
  10. data/app/controllers/contacts_controller.rb +82 -0
  11. data/app/controllers/spud/admin/inquiries_controller.rb +38 -0
  12. data/app/controllers/spud/admin/inquiry_forms_controller.rb +58 -0
  13. data/app/controllers/spud/inquiries/sitemaps_controller.rb +7 -0
  14. data/app/helpers/contacts_helper.rb +3 -0
  15. data/app/mailers/spud/inquiry_mailer.rb +10 -0
  16. data/app/models/spud_inquiry.rb +46 -0
  17. data/app/models/spud_inquiry_field.rb +13 -0
  18. data/app/models/spud_inquiry_form.rb +27 -0
  19. data/app/models/spud_inquiry_form_field.rb +21 -0
  20. data/app/views/contacts/_show.html.erb +45 -0
  21. data/app/views/contacts/show.html.erb +4 -0
  22. data/app/views/contacts/show.js.erb +1 -0
  23. data/app/views/contacts/thankyou.html.erb +2 -0
  24. data/app/views/contacts/thankyou.js.erb +1 -0
  25. data/app/views/layouts/spud/inquiries/detail.html.erb +6 -0
  26. data/app/views/spud/admin/inquiries/index.html.erb +30 -0
  27. data/app/views/spud/admin/inquiries/show.html.erb +8 -0
  28. data/app/views/spud/admin/inquiry_forms/_form.html.erb +52 -0
  29. data/app/views/spud/admin/inquiry_forms/_spud_inquiry_form_field_fields.html.erb +56 -0
  30. data/app/views/spud/admin/inquiry_forms/edit.html.erb +6 -0
  31. data/app/views/spud/admin/inquiry_forms/index.html.erb +22 -0
  32. data/app/views/spud/admin/inquiry_forms/new.html.erb +9 -0
  33. data/app/views/spud/inquiries/sitemaps/show.xml.builder +16 -0
  34. data/app/views/spud/inquiry_mailer/inquiry_notification.html.erb +15 -0
  35. data/app/views/spud/inquiry_mailer/inquiry_notification.text.erb +7 -0
  36. data/config/routes.rb +16 -0
  37. data/db/migrate/20120117133405_create_spud_inquiries.rb +8 -0
  38. data/db/migrate/20120117133412_create_spud_inquiry_fields.rb +13 -0
  39. data/db/migrate/20120121194439_create_spud_inquiry_forms.rb +9 -0
  40. data/db/migrate/20120121194447_create_spud_inquiry_form_fields.rb +12 -0
  41. data/db/migrate/20120122173829_add_field_order_to_spud_inquiry_form_fields.rb +7 -0
  42. data/db/migrate/20120126132407_add_spud_inquiry_form_id_to_spud_inquiries.rb +11 -0
  43. data/db/migrate/20120126132522_add_recipients_to_spud_inquiry_forms.rb +6 -0
  44. data/db/migrate/20120127023335_add_url_name_to_spud_inquiry_forms.rb +6 -0
  45. data/db/migrate/20120413124900_change_inquiry_form_fields_column.rb +9 -0
  46. data/db/migrate/20121228145215_add_thank_you_content_to_spud_inquiry_form.rb +5 -0
  47. data/db/migrate/20130627121030_add_placeholder_to_spud_inquiry_form_fields.rb +5 -0
  48. data/db/migrate/20131111143656_add_submit_title_to_spud_inquiry_form.rb +5 -0
  49. data/db/migrate/20131111143945_add_field_name_to_spud_inquiry_form_fields.rb +5 -0
  50. data/db/migrate/20131111144731_add_class_name_to_spud_inquiry_form_fields.rb +5 -0
  51. data/db/migrate/20131204163221_add_field_name_to_spud_inquiry_fields.rb +5 -0
  52. data/lib/spud_inquiries/configuration.rb +16 -0
  53. data/lib/spud_inquiries/engine.rb +28 -0
  54. data/lib/spud_inquiries/liquid_form.rb +47 -0
  55. data/lib/spud_inquiries/version.rb +5 -0
  56. data/lib/tasks/spud_inquiries_tasks.rake +4 -0
  57. data/lib/tb_inquiries.rb +7 -0
  58. data/spec/controllers/contacts_controller_spec.rb +69 -0
  59. data/spec/controllers/spud/admin/inquiries_controller_spec.rb +55 -0
  60. data/spec/controllers/spud/admin/inquiry_forms_controller_spec.rb +98 -0
  61. data/spec/controllers/spud/inquiries/sitemaps_controller_spec.rb +24 -0
  62. data/spec/dummy/README.rdoc +261 -0
  63. data/spec/dummy/Rakefile +7 -0
  64. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  65. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  66. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  67. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  68. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  69. data/spec/dummy/config/application.rb +57 -0
  70. data/spec/dummy/config/boot.rb +10 -0
  71. data/spec/dummy/config/database.yml +9 -0
  72. data/spec/dummy/config/environment.rb +5 -0
  73. data/spec/dummy/config/environments/development.rb +37 -0
  74. data/spec/dummy/config/environments/production.rb +67 -0
  75. data/spec/dummy/config/environments/test.rb +44 -0
  76. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  77. data/spec/dummy/config/initializers/inflections.rb +15 -0
  78. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  79. data/spec/dummy/config/initializers/secret_token.rb +8 -0
  80. data/spec/dummy/config/initializers/session_store.rb +8 -0
  81. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  82. data/spec/dummy/config/locales/en.yml +5 -0
  83. data/spec/dummy/config/routes.rb +3 -0
  84. data/spec/dummy/config.ru +4 -0
  85. data/spec/dummy/db/migrate/20120610131537_create_spud_admin_permissions.spud_core.rb +12 -0
  86. data/spec/dummy/db/migrate/20120610131538_create_spud_users.spud_core.rb +30 -0
  87. data/spec/dummy/db/migrate/20120610131539_add_time_zone_to_spud_user.spud_core.rb +7 -0
  88. data/spec/dummy/db/migrate/20120610131540_add_scope_to_spud_admin_permissions.spud_core.rb +7 -0
  89. data/spec/dummy/db/migrate/20120610131541_create_spud_user_settings.spud_core.rb +12 -0
  90. data/spec/dummy/db/migrate/20140109151036_create_spud_roles.tb_core.rb +11 -0
  91. data/spec/dummy/db/migrate/20140109151037_create_spud_permissions.tb_core.rb +11 -0
  92. data/spec/dummy/db/migrate/20140109151038_create_spud_role_permissions.tb_core.rb +12 -0
  93. data/spec/dummy/db/migrate/20140109151039_drop_spud_admin_permissions.tb_core.rb +16 -0
  94. data/spec/dummy/db/migrate/20140109151040_create_spud_inquiries.spud_inquiries.rb +9 -0
  95. data/spec/dummy/db/migrate/20140109151041_create_spud_inquiry_fields.spud_inquiries.rb +14 -0
  96. data/spec/dummy/db/migrate/20140109151042_create_spud_inquiry_forms.spud_inquiries.rb +10 -0
  97. data/spec/dummy/db/migrate/20140109151043_create_spud_inquiry_form_fields.spud_inquiries.rb +13 -0
  98. data/spec/dummy/db/migrate/20140109151044_add_field_order_to_spud_inquiry_form_fields.spud_inquiries.rb +8 -0
  99. data/spec/dummy/db/migrate/20140109151045_add_spud_inquiry_form_id_to_spud_inquiries.spud_inquiries.rb +12 -0
  100. data/spec/dummy/db/migrate/20140109151046_add_recipients_to_spud_inquiry_forms.spud_inquiries.rb +7 -0
  101. data/spec/dummy/db/migrate/20140109151047_add_url_name_to_spud_inquiry_forms.spud_inquiries.rb +7 -0
  102. data/spec/dummy/db/migrate/20140109151048_change_inquiry_form_fields_column.spud_inquiries.rb +10 -0
  103. data/spec/dummy/db/migrate/20140109151049_add_thank_you_content_to_spud_inquiry_form.spud_inquiries.rb +6 -0
  104. data/spec/dummy/db/migrate/20140109151050_add_placeholder_to_spud_inquiry_form_fields.spud_inquiries.rb +6 -0
  105. data/spec/dummy/db/migrate/20140109151051_add_submit_title_to_spud_inquiry_form.spud_inquiries.rb +6 -0
  106. data/spec/dummy/db/migrate/20140109151052_add_field_name_to_spud_inquiry_form_fields.spud_inquiries.rb +6 -0
  107. data/spec/dummy/db/migrate/20140109151053_add_class_name_to_spud_inquiry_form_fields.spud_inquiries.rb +6 -0
  108. data/spec/dummy/db/migrate/20140109151054_add_field_name_to_spud_inquiry_fields.spud_inquiries.rb +6 -0
  109. data/spec/dummy/db/migrate/20140110151647_create_tb_liquid_spud_liquid_tags.tb_liquid.rb +13 -0
  110. data/spec/dummy/db/schema.rb +143 -0
  111. data/spec/dummy/log/test.log +425 -0
  112. data/spec/dummy/public/404.html +26 -0
  113. data/spec/dummy/public/422.html +26 -0
  114. data/spec/dummy/public/500.html +25 -0
  115. data/spec/dummy/public/favicon.ico +0 -0
  116. data/spec/dummy/script/rails +6 -0
  117. data/spec/models/spud_inquiry_field_spec.rb +18 -0
  118. data/spec/models/spud_inquiry_form_field_spec.rb +36 -0
  119. data/spec/models/spud_inquiry_form_spec.rb +28 -0
  120. data/spec/models/spud_inquiry_spec.rb +22 -0
  121. data/spec/spec_helper.rb +49 -0
  122. data/spec/support/authlogic_helper.rb +2 -0
  123. metadata +384 -0
@@ -0,0 +1,30 @@
1
+ # This migration comes from spud_core (originally 20111214161146)
2
+ class CreateSpudUsers < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_users do |t|
5
+
6
+ t.string :first_name
7
+ t.string :last_name
8
+ t.boolean :super_admin
9
+ t.string :login, :null => false # optional, you can use email instead, or both
10
+ t.string :email, :null => false # optional, you can use login instead, or both
11
+ t.string :crypted_password, :null => false # optional, see below
12
+ t.string :password_salt, :null => false # optional, but highly recommended
13
+ t.string :persistence_token, :null => false # required
14
+ t.string :single_access_token, :null => false # optional, see Authlogic::Session::Params
15
+ t.string :perishable_token, :null => false # optional, see Authlogic::Session::Perishability
16
+
17
+ # Magic columns, just like ActiveRecord's created_at and updated_at. These are automatically maintained by Authlogic if they are present.
18
+ t.integer :login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
19
+ t.integer :failed_login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
20
+ t.datetime :last_request_at # optional, see Authlogic::Session::MagicColumns
21
+ t.datetime :current_login_at # optional, see Authlogic::Session::MagicColumns
22
+ t.datetime :last_login_at # optional, see Authlogic::Session::MagicColumns
23
+ t.string :current_login_ip # optional, see Authlogic::Session::MagicColumns
24
+ t.string :last_login_ip # optional, see Authlogic::Session::MagicColumns
25
+ t.timestamps
26
+ end
27
+ add_index :spud_users,:login
28
+ add_index :spud_users,:email
29
+ end
30
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_core (originally 20120327124229)
2
+ class AddTimeZoneToSpudUser < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_users, :time_zone, :string
5
+
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_core (originally 20120328235431)
2
+ class AddScopeToSpudAdminPermissions < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_admin_permissions, :scope, :string
5
+
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_core (originally 20120329174000)
2
+ class CreateSpudUserSettings < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_user_settings do |t|
5
+ t.integer :spud_user_id
6
+ t.string :key
7
+ t.string :value
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # This migration comes from tb_core (originally 20130620143010)
2
+ class CreateSpudRoles < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_roles do |t|
5
+ t.string :name
6
+ t.timestamps
7
+ end
8
+ add_column :spud_users, :spud_role_id, :integer
9
+ add_index :spud_users, :spud_role_id
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # This migration comes from tb_core (originally 20130620143941)
2
+ class CreateSpudPermissions < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_permissions do |t|
5
+ t.string :name, :null => false
6
+ t.string :tag, :null => false
7
+ t.timestamps
8
+ end
9
+ add_index :spud_permissions, :tag, :unique => true
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from tb_core (originally 20130620151132)
2
+ class CreateSpudRolePermissions < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_role_permissions do |t|
5
+ t.integer :spud_role_id, :null => false
6
+ t.string :spud_permission_tag, :null => false
7
+ t.timestamps
8
+ end
9
+ add_index :spud_role_permissions, :spud_role_id
10
+ add_index :spud_role_permissions, :spud_permission_tag
11
+ end
12
+ end
@@ -0,0 +1,16 @@
1
+ # This migration comes from tb_core (originally 20130620163144)
2
+ class DropSpudAdminPermissions < ActiveRecord::Migration
3
+ def up
4
+ drop_table :spud_admin_permissions
5
+ end
6
+
7
+ def down
8
+ create_table :spud_admin_permissions do |t|
9
+ t.integer :user_id
10
+ t.string :name
11
+ t.boolean :access
12
+ t.string :scope
13
+ t.timestamps
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,9 @@
1
+ # This migration comes from spud_inquiries (originally 20120117133405)
2
+ class CreateSpudInquiries < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_inquiries do |t|
5
+ t.string :email
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,14 @@
1
+ # This migration comes from spud_inquiries (originally 20120117133412)
2
+ class CreateSpudInquiryFields < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_inquiry_fields do |t|
5
+ t.string :name
6
+ t.text :value
7
+ t.integer :spud_inquiry_id
8
+
9
+ t.timestamps
10
+ end
11
+
12
+ add_index :spud_inquiry_fields,:spud_inquiry_id, :name => "inquiry_field_parent_id"
13
+ end
14
+ end
@@ -0,0 +1,10 @@
1
+ # This migration comes from spud_inquiries (originally 20120121194439)
2
+ class CreateSpudInquiryForms < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_inquiry_forms do |t|
5
+ t.string :name
6
+ t.text :content
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,13 @@
1
+ # This migration comes from spud_inquiries (originally 20120121194447)
2
+ class CreateSpudInquiryFormFields < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_inquiry_form_fields do |t|
5
+ t.integer :spud_inquiry_form_id
6
+ t.string :field_type
7
+ t.string :name
8
+ t.string :options
9
+ t.string :default_value
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ # This migration comes from spud_inquiries (originally 20120122173829)
2
+ class AddFieldOrderToSpudInquiryFormFields < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_form_fields, :field_order, :integer
5
+ add_column :spud_inquiry_form_fields, :required, :boolean
6
+ add_index :spud_inquiry_form_fields,:field_order, :name => "form_field_order"
7
+ end
8
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_inquiries (originally 20120126132407)
2
+ class AddSpudInquiryFormIdToSpudInquiries < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiries, :spud_inquiry_form_id, :integer
5
+ add_column :spud_inquiries, :recipients, :text
6
+ add_column :spud_inquiries, :subject,:string
7
+ add_column :spud_inquiries, :marked_as_read,:boolean,:default => false
8
+
9
+ add_index :spud_inquiries, :marked_as_read, :name => "idx_inquiry_read"
10
+ add_index :spud_inquiries, :spud_inquiry_form_id, :name => "idx_inquiry_form"
11
+ end
12
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_inquiries (originally 20120126132522)
2
+ class AddRecipientsToSpudInquiryForms < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_forms, :recipients, :text
5
+ add_column :spud_inquiry_forms, :subject, :string
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_inquiries (originally 20120127023335)
2
+ class AddUrlNameToSpudInquiryForms < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_forms, :url_name, :string
5
+ add_index :spud_inquiry_forms,:url_name, :name => "idx_form_url_name"
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # This migration comes from spud_inquiries (originally 20120413124900)
2
+ class ChangeInquiryFormFieldsColumn < ActiveRecord::Migration
3
+ def up
4
+ change_column :spud_inquiry_form_fields, :options, :text
5
+ end
6
+
7
+ def down
8
+ change_column :spud_inquiry_form_fields, :options, :string
9
+ end
10
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from spud_inquiries (originally 20121228145215)
2
+ class AddThankYouContentToSpudInquiryForm < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_forms, :thank_you_content, :text
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from spud_inquiries (originally 20130627121030)
2
+ class AddPlaceholderToSpudInquiryFormFields < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_form_fields, :placeholder, :string
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from spud_inquiries (originally 20131111143656)
2
+ class AddSubmitTitleToSpudInquiryForm < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_forms, :submit_title, :string
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from spud_inquiries (originally 20131111143945)
2
+ class AddFieldNameToSpudInquiryFormFields < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_form_fields, :field_name, :string
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from spud_inquiries (originally 20131111144731)
2
+ class AddClassNameToSpudInquiryFormFields < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_form_fields, :class_name, :string
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from spud_inquiries (originally 20131204163221)
2
+ class AddFieldNameToSpudInquiryFields < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_inquiry_fields, :field_name, :string
5
+ end
6
+ end
@@ -0,0 +1,13 @@
1
+ # This migration comes from tb_liquid (originally 20140110142037)
2
+ class CreateTbLiquidSpudLiquidTags < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_liquid_tags do |t|
5
+ t.integer :attachment_id
6
+ t.string :attachment_type
7
+ t.string :tag_name
8
+ t.string :value
9
+ t.timestamps
10
+ end
11
+ add_index :spud_liquid_tags, [:tag_name, :value]
12
+ end
13
+ end
@@ -0,0 +1,143 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140110151647) do
15
+
16
+ create_table "spud_inquiries", force: true do |t|
17
+ t.string "email"
18
+ t.datetime "created_at"
19
+ t.datetime "updated_at"
20
+ t.integer "spud_inquiry_form_id"
21
+ t.text "recipients"
22
+ t.string "subject"
23
+ t.boolean "marked_as_read", default: false
24
+ end
25
+
26
+ add_index "spud_inquiries", ["marked_as_read"], name: "idx_inquiry_read", using: :btree
27
+ add_index "spud_inquiries", ["spud_inquiry_form_id"], name: "idx_inquiry_form", using: :btree
28
+
29
+ create_table "spud_inquiry_fields", force: true do |t|
30
+ t.string "name"
31
+ t.text "value"
32
+ t.integer "spud_inquiry_id"
33
+ t.datetime "created_at"
34
+ t.datetime "updated_at"
35
+ t.string "field_name"
36
+ end
37
+
38
+ add_index "spud_inquiry_fields", ["spud_inquiry_id"], name: "inquiry_field_parent_id", using: :btree
39
+
40
+ create_table "spud_inquiry_form_fields", force: true do |t|
41
+ t.integer "spud_inquiry_form_id"
42
+ t.string "field_type"
43
+ t.string "name"
44
+ t.text "options"
45
+ t.string "default_value"
46
+ t.datetime "created_at"
47
+ t.datetime "updated_at"
48
+ t.integer "field_order"
49
+ t.boolean "required"
50
+ t.string "placeholder"
51
+ t.string "field_name"
52
+ t.string "class_name"
53
+ end
54
+
55
+ add_index "spud_inquiry_form_fields", ["field_order"], name: "form_field_order", using: :btree
56
+
57
+ create_table "spud_inquiry_forms", force: true do |t|
58
+ t.string "name"
59
+ t.text "content"
60
+ t.datetime "created_at"
61
+ t.datetime "updated_at"
62
+ t.text "recipients"
63
+ t.string "subject"
64
+ t.string "url_name"
65
+ t.text "thank_you_content"
66
+ t.string "submit_title"
67
+ end
68
+
69
+ add_index "spud_inquiry_forms", ["url_name"], name: "idx_form_url_name", using: :btree
70
+
71
+ create_table "spud_liquid_tags", force: true do |t|
72
+ t.integer "attachment_id"
73
+ t.string "attachment_type"
74
+ t.string "tag_name"
75
+ t.string "value"
76
+ t.datetime "created_at"
77
+ t.datetime "updated_at"
78
+ end
79
+
80
+ add_index "spud_liquid_tags", ["tag_name", "value"], name: "index_spud_liquid_tags_on_tag_name_and_value", using: :btree
81
+
82
+ create_table "spud_permissions", force: true do |t|
83
+ t.string "name", null: false
84
+ t.string "tag", null: false
85
+ t.datetime "created_at"
86
+ t.datetime "updated_at"
87
+ end
88
+
89
+ add_index "spud_permissions", ["tag"], name: "index_spud_permissions_on_tag", unique: true, using: :btree
90
+
91
+ create_table "spud_role_permissions", force: true do |t|
92
+ t.integer "spud_role_id", null: false
93
+ t.string "spud_permission_tag", null: false
94
+ t.datetime "created_at"
95
+ t.datetime "updated_at"
96
+ end
97
+
98
+ add_index "spud_role_permissions", ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag", using: :btree
99
+ add_index "spud_role_permissions", ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id", using: :btree
100
+
101
+ create_table "spud_roles", force: true do |t|
102
+ t.string "name"
103
+ t.datetime "created_at"
104
+ t.datetime "updated_at"
105
+ end
106
+
107
+ create_table "spud_user_settings", force: true do |t|
108
+ t.integer "spud_user_id"
109
+ t.string "key"
110
+ t.string "value"
111
+ t.datetime "created_at"
112
+ t.datetime "updated_at"
113
+ end
114
+
115
+ create_table "spud_users", force: true do |t|
116
+ t.string "first_name"
117
+ t.string "last_name"
118
+ t.boolean "super_admin"
119
+ t.string "login", null: false
120
+ t.string "email", null: false
121
+ t.string "crypted_password", null: false
122
+ t.string "password_salt", null: false
123
+ t.string "persistence_token", null: false
124
+ t.string "single_access_token", null: false
125
+ t.string "perishable_token", null: false
126
+ t.integer "login_count", default: 0, null: false
127
+ t.integer "failed_login_count", default: 0, null: false
128
+ t.datetime "last_request_at"
129
+ t.datetime "current_login_at"
130
+ t.datetime "last_login_at"
131
+ t.string "current_login_ip"
132
+ t.string "last_login_ip"
133
+ t.datetime "created_at"
134
+ t.datetime "updated_at"
135
+ t.string "time_zone"
136
+ t.integer "spud_role_id"
137
+ end
138
+
139
+ add_index "spud_users", ["email"], name: "index_spud_users_on_email", using: :btree
140
+ add_index "spud_users", ["login"], name: "index_spud_users_on_login", using: :btree
141
+ add_index "spud_users", ["spud_role_id"], name: "index_spud_users_on_spud_role_id", using: :btree
142
+
143
+ end