pointless_feedback 4.1.4 → 4.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1006c4a0633cba8ab2619732e261e25b68ac3a5
4
- data.tar.gz: 14b85dd1f5d81c67e23b2fd9a35ce6e884ffd44b
3
+ metadata.gz: 7ec9ec8e911135c9097ba31c372f50865a753375
4
+ data.tar.gz: 2b1bc459727d4a9200b16d10da89a7322f3cb7fe
5
5
  SHA512:
6
- metadata.gz: 06eee19b847d1e7b6757b76ceab315e351b90c8089a7a9c9a9ebd3d97774d1f6f6705808c00d69d38488c826683b2f66a7f3d8996edaf3508cbaffb6588eefd6
7
- data.tar.gz: 0c7fbe829f3af460bb03d50a934dcbee2d31ef52573a472f4d215e47609d4933b87ff36b4cd8932a33fdcbaf899af007861b327d1bece8b0f268867aa5e0c789
6
+ metadata.gz: 23b8e08fd74c50e8d8a7d2589dbad010ae4ecc5e73e687196454dae4637069cf898ada68c8d05f6c6f11cf611fa3daef697433ad2315249d8518a747cfda2081
7
+ data.tar.gz: a8f3ee1d7b955529613dabb366e9b4227bb621650ac306561a171b639b1dd046d314361b7f0ca23c627f73794eae508d3e9f81729ccdb330563e6587decdbc96
data/README.md CHANGED
@@ -95,6 +95,12 @@ Defaults to engine's namespace, e.g. `pointless_feedback_messages`. Change to a
95
95
  **invalid_words:**
96
96
  List of words in the feedback description that would prevent an email from sending.
97
97
 
98
+ **show_url_field:**
99
+ Defaults to `false`. If set to `true`, will show an additional URL field in the form.
100
+
101
+ **url_label:**
102
+ Defaults to `URL`. The label for the URL field that will be shown if `show_url_field` is `true`.
103
+
98
104
  **google_captcha_site_key & google_captcha_secret_key:**
99
105
  If you'd like to block out the robots, set up a Google Captcha instance:
100
106
 
@@ -29,7 +29,8 @@ module PointlessFeedback
29
29
  :email_address,
30
30
  :name,
31
31
  :topic,
32
- :contact_info
32
+ :contact_info,
33
+ :url
33
34
  ])
34
35
  end
35
36
 
@@ -35,7 +35,8 @@ module PointlessFeedback
35
35
  "Email" => email_address,
36
36
  "Topic" => topic,
37
37
  "Description" => description,
38
- "Date" => created_at.strftime("%m/%d/%y")
38
+ "Date" => created_at.strftime("%m/%d/%y"),
39
+ "URL" => url
39
40
  )
40
41
  rescue => e
41
42
  # ignore errors in production, last thing you want is a 500
@@ -3,4 +3,7 @@ You've got feedback!
3
3
  <p>Name: <%= @message.name %></p>
4
4
  <p>Email Address: <%= @message.email_address %></p>
5
5
  <p>Topic: <%= @message.topic %></p>
6
+ <% if PointlessFeedback.show_url_field %>
7
+ <p><%= PointlessFeedback.url_label %>: <%= @message.url %></p>
8
+ <% end %>
6
9
  <p>Description: <%= @message.description %></p>
@@ -45,6 +45,13 @@
45
45
  <%= f.select :topic, PointlessFeedback.message_topics, { :prompt => true } %>
46
46
  </div>
47
47
 
48
+ <% if PointlessFeedback.show_url_field %>
49
+ <div class="field">
50
+ <%= f.label :url, PointlessFeedback.url_label %>
51
+ <%= f.text_field :url %>
52
+ </div>
53
+ <% end %>
54
+
48
55
  <div class="field">
49
56
  <%= f.label :description %>
50
57
  <%= f.text_area :description %>
@@ -0,0 +1,5 @@
1
+ class AddUrlToPointlessFeedbackMessages < ActiveRecord::Migration
2
+ def change
3
+ add_column :pointless_feedback_messages, :url, :string
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module PointlessFeedback
2
- VERSION = "4.1.4"
2
+ VERSION = "4.1.5"
3
3
  end
@@ -55,6 +55,12 @@ module PointlessFeedback
55
55
  mattr_accessor :invalid_words
56
56
  @@invalid_words = []
57
57
 
58
+ mattr_accessor :show_url_field
59
+ @@show_url_field = false
60
+
61
+ mattr_accessor :url_label
62
+ @@url_label = "URL"
63
+
58
64
  # Default way to setup PointlessFeedback. Run rails generate
59
65
  # pointless_feedback_install to create a fresh initializer with all
60
66
  # configuration values.
Binary file
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20130501182659) do
14
+ ActiveRecord::Schema.define(version: 20220518205500) do
15
15
 
16
16
  create_table "pointless_feedback_messages", force: :cascade do |t|
17
17
  t.string "name"
@@ -20,6 +20,7 @@ ActiveRecord::Schema.define(version: 20130501182659) do
20
20
  t.text "description"
21
21
  t.datetime "created_at"
22
22
  t.datetime "updated_at"
23
+ t.string "url"
23
24
  end
24
25
 
25
26
  end
Binary file
@@ -17,3 +17,21 @@ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `n
17
17
   (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
18
18
   (0.1ms) SELECT version FROM "schema_migrations"
19
19
   (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130501182659')
20
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
21
+ Migrating to AddUrlToPointlessFeedbackMessages (20220518205500)
22
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
23
+ Migrating to AddUrlToPointlessFeedbackMessages (20220518205500)
24
+  (0.0ms) begin transaction
25
+  (0.5ms) ALTER TABLE "pointless_feedback_messages" ADD "url" varchar
26
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20220518205500"]]
27
+  (1.1ms) commit transaction
28
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
29
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
30
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
31
+  (1.2ms) CREATE TABLE "pointless_feedback_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email_address" varchar, "topic" varchar, "description" text, "created_at" datetime, "updated_at" datetime, "url" varchar) 
32
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
33
+  (0.1ms) select sqlite_version(*)
34
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
35
+  (0.1ms) SELECT version FROM "schema_migrations"
36
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20220518205500')
37
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20130501182659')