feedback_router 0.8.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -3
- data/lib/feedback_router.rb +1 -0
- data/lib/feedback_router/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d69385ddb1a643378969c25e8c2879c3594f002
|
4
|
+
data.tar.gz: 6383eeb5c980bbf1340a5856304183e177437066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c71874a9c80c56b8f9b2a4be1ca76843bc03964b9c88f9c7c58f23fbad3e808119e838485ed0a3ec94a8ffa17e018adabb39f2462f5e01f4b2e0e06beca1db4
|
7
|
+
data.tar.gz: 5114e29d17d15d3ba0f3eacb921dfd73363fe10195338051ff1ec4cac0fd54a439bf3f93e698a643f6479ea2a57b22769951a3885a0b4e50ad85947f53043c5d
|
data/README.md
CHANGED
@@ -16,13 +16,25 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
$ gem install feedback_router
|
18
18
|
|
19
|
-
|
19
|
+
Once the Gem is installed you have to create an environment of the location that the feedback will be sent to. The environment variable must be called ```ENV['FEEDBACK_LOCATION']``` and should reflect the entire URL of where the data is being sent (for example ```http://localhost:3000/example_route```).
|
20
20
|
|
21
|
-
|
21
|
+
#Usage
|
22
|
+
|
23
|
+
After installing the gem, paste the following bit of code into your application_controller.rb:
|
24
|
+
|
25
|
+
protect_from_forgery with: :null_session, if: Proc.new { |c| c.request.format == 'application/json' }
|
26
|
+
|
27
|
+
This will allow the feedback_router gem to send data through to your create method.
|
28
|
+
|
29
|
+
Now all you have to do is call the gem after the feedback params have been given, like so:
|
30
|
+
|
31
|
+
FeedbackRouter.send(feedback_params, "Name of Application")
|
32
|
+
|
33
|
+
Where "Name of Application" is the name of the Rails App sending the feedback.
|
22
34
|
|
23
35
|
## Contributing
|
24
36
|
|
25
|
-
1. Fork it ( https://github.com/
|
37
|
+
1. Fork it ( https://github.com/ElliottAYoung/feedback_router/fork )
|
26
38
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
39
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
40
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/feedback_router.rb
CHANGED