You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/integrations/rails.rst
+4-26Lines changed: 4 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Ruby on Rails
2
2
=============
3
3
4
-
In Rails, all uncaught exceptions will be automatically reported.
4
+
In Rails, all uncaught exceptions will be automatically reported.
5
5
6
6
We support Rails 4 and newer.
7
7
@@ -56,29 +56,7 @@ Params and sessions
56
56
end
57
57
end
58
58
59
-
Authlogic
60
-
---------
59
+
Caveats
60
+
-------
61
61
62
-
When using Authlogic for authentication, you can provide user context by
63
-
binding to session ``after_persisting`` and ``after_destroy`` events in
64
-
``user_session.rb``:
65
-
66
-
.. sourcecode:: ruby
67
-
68
-
class UserSession < Authlogic::Session::Base
69
-
# events binding
70
-
after_persisting :raven_set_user_context
71
-
after_destroy :raven_clear_user_context
72
-
73
-
def raven_set_user_context
74
-
Raven.user_context({
75
-
'id' => self.user.id,
76
-
'email' => self.user.email,
77
-
'username' => self.user.username
78
-
})
79
-
end
80
-
81
-
def raven_clear_user_context
82
-
Raven.user_context({})
83
-
end
84
-
end
62
+
Currently, custom exception applications (`config.exceptions_app`) are not supported. If you are using a custom exception app, you must manually integrate Raven yourself.
0 commit comments