1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
Commit graph

22 commits

Author SHA1 Message Date
José Valim
8a93c34080 Clean up Devise parameter sanitizer 2013-04-13 23:21:46 -07:00
Drew Ulmer
d20fdf87b6 Introduce BaseSanitizer null sanitizer and controller-specific callbacks
This updates Devise's StrongParameter support to feature:

- A Null base sanitizer to support existing Rails 3.x installations that
  don't want to use StrongParameters yet
- A new, simpler API for ParameterSanitizer: #permit, #permit!, and #forbid
- Overrideable callbacks on a controller-basis, e.g. #create_sessions_params
  for passing the current scope's parameters through StrongParameters and
  a helper method, whitelisted_params, for rolling your own implementations
  of #create_x_params in your own controllers.
- Lots of tests!
2013-04-10 10:33:50 -05:00
Drew Ulmer
78f137368c Add support for Rails 4 strong_parameters
This brings support for Rails 4 StrongParameters changes.

- Parameter sanitizing is setup for Devise controllers via
  resource_params except Omniauth Callbacks which doesn't use
  resource_params.

- Change #build_resource to not call resource_params for get requests.
  Parameter sanitizing is only needed when params are posted to the
  server so there's no need to try to construct resource params on get
  requests (new, edit).
2013-03-31 21:31:48 -05:00
Adam Meehan
7ec4c1424d Add resource_params internal helper to param filtering
In light of recent discussions around mass assignment security and
the alternate solution of using the controller to filter params, not the model,
a hook/helper is needed to be able to override how the params are filtered
before they are used to build the resource.
2012-05-15 18:07:02 +10:00
José Valim
66b93e8fd2 Clean up as we don't need to call render_with_scope anymore. 2012-01-02 22:12:09 +01:00
José Valim
d9df632671 Get rid of InternalHelpers, refactor scoped views for more performant behavior. 2012-01-02 22:01:28 +01:00
José Valim
a29a30effc Move InternalHelpers to parent controller. 2012-01-02 20:30:56 +01:00
José Valim
1fdeadd113 Merge pull request #1188 from sj26/controller-inheritence
Make all controllers inherit from a single DeviseController
2012-01-02 11:24:33 -08:00
José Valim
2a5ad4664b Change all paranoid settings to behave as success instead of as failure, closes #1375. 2011-10-15 10:52:00 +02:00
José Valim
bba6562dcc after_sign_in_path_for now redirects to session[scope_return_to] if any value is stored in it 2011-09-29 13:07:13 +02:00
Simon Ernst
517343ddb5 Add ability to override redirect_to path after account confirmation. 2011-07-08 11:21:01 +02:00
Samuel Cochran
2b64c6d951 Make all controllers inherit from a single DeviseController 2011-06-25 03:34:13 +08:00
Rodrigo Flores
2ae2fdc9f8 Returning an empty JSON for creating confirmation requests 2011-06-22 21:27:20 -03:00
Rodrigo Flores
b58e0ef991 Removed useless blank lines 2011-06-22 12:52:11 -03:00
Rodrigo Flores
6199252011 Refactored paranoid mode actions for it to appear once 2011-06-22 12:52:11 -03:00
Rodrigo Flores
225c89fbf1 Paranoid mode on confirmable 2011-06-22 12:52:10 -03:00
Hiroki Yoshioka
bd9f148d24 Allow to override the path after resending confirmation instructions. 2011-04-15 16:32:41 +08:00
José Valim
5b94d9b803 Refactor a bit navigational format responses, to not call to_sym and reuse the request_format logic from FailureApp. 2011-03-30 14:09:12 +02:00
Prem Sichanugrist
8170d5e340 Add support for non-navigational formats in ConfirmationsController
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-03-30 13:38:00 +02:00
José Valim
0aa41d6388 Tidy up lose ends. 2010-07-26 20:32:05 +02:00
José Valim
ac742e3271 Clean up lockable and class methods API. 2010-03-10 16:13:54 +01:00
José Valim
02e8c04cde Update views generator and now have scoped views. 2010-02-17 12:26:54 +01:00
Renamed from app/controllers/confirmations_controller.rb (Browse further)