Module: Devise::Models::Capturable
- Defined in:
- lib/devise_capturable/model.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#before_capturable_create(capture_data, params) ⇒ Object
This is called from strategy and is used to fill a user model before creating it It defaults to just setting the email, but you can override this in your user model.
-
#before_capturable_sign_in(capture_data, params) ⇒ Object
This is called from strategy and can be used to update an existing user model if the data changes on the janrain side.
Class Method Details
.included(base) ⇒ Object
7 8 9 10 11 |
# File 'lib/devise_capturable/model.rb', line 7 def self.included(base) base.class_eval do extend ClassMethods end end |
Instance Method Details
#before_capturable_create(capture_data, params) ⇒ Object
This is called from strategy and is used to fill a user model before creating it It defaults to just setting the email, but you can override this in your user model
15 16 17 |
# File 'lib/devise_capturable/model.rb', line 15 def before_capturable_create(capture_data, params) self.email = capture_data["email"] end |
#before_capturable_sign_in(capture_data, params) ⇒ Object
This is called from strategy and can be used to update an existing user model if the data changes on the janrain side. It defaults to doing nothing.
21 22 |
# File 'lib/devise_capturable/model.rb', line 21 def before_capturable_sign_in(capture_data, params) end |