deferrable_actions 0.0.1 → 0.0.2
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.
- data/README.md +3 -3
- data/lib/deferrable_actions/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Or install it yourself as:
|
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
|
-
Include the module '
|
|
22
|
+
Include the module 'DeferrableActions' in the controller that you want
|
|
23
23
|
to defer actions, if you want, you can include the module in the
|
|
24
24
|
ApplicationController and all your controllers are going to have the
|
|
25
25
|
ability to defer actions.
|
|
@@ -36,7 +36,7 @@ end
|
|
|
36
36
|
|
|
37
37
|
The principal way that we use deferrable actions, is to defer actions
|
|
38
38
|
that need to authenticate the user in the middle of a POST request,
|
|
39
|
-
because we can't
|
|
39
|
+
because we can't redirect to a POST.
|
|
40
40
|
|
|
41
41
|
We use it like this:
|
|
42
42
|
|
|
@@ -65,7 +65,7 @@ class SessionsController < ApplicationController
|
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
-
def
|
|
68
|
+
def on_auth_failure
|
|
69
69
|
if defered_action?
|
|
70
70
|
on_failure_execute_defered_action!
|
|
71
71
|
else
|