1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/lib/devise
schneems a00921f417 [close #2755] Raise incompatible route error
Right now if you try to use a route that you have defined in your `omniauth_callbacks` but you have not declared that resource to be `omniauthable` you will get a weird route missing error which causes the user to look in the routes for the fix:

```ruby
devise_for  :users, controllers: {omniauth_callbacks: "users/omniauth_callbacks"}
```

This PR checks to see if the mapping of `:user` has the module `omniauthable` included in it when `omniauth_callbacks` is specified in the route. If it does not, an instructional error is raised:

```
Mapping omniauth_callbacks on a resource that is not omniauthable
Please add `devise :omniauthable` to the `User` model
```
2013-12-18 19:19:25 -06:00
..
controllers Cleanup trailing whitespace 2013-12-05 09:03:32 +01:00
hooks Cleanup trailing whitespace 2013-12-05 09:03:32 +01:00
mailers Get rid of deprecated code 2013-08-05 11:24:04 +02:00
models Remove authentication some authentication token stuffs 2013-12-10 12:30:28 -02:00
omniauth Delegate omniauth_authorize_path to the router, closes #1843 2012-06-16 13:43:11 +02:00
orm Cleanup trailing whitespace 2013-12-05 09:03:32 +01:00
rails [close #2755] Raise incompatible route error 2013-12-18 19:19:25 -06:00
strategies Remove authentication some authentication token stuffs 2013-12-10 12:30:28 -02:00
delegator.rb
failure_app.rb Add store_location_for helper 2013-11-09 00:59:00 +00:00
mapping.rb We are not duck typing here, so don't call the variable duck 2013-06-01 10:06:33 +09:00
models.rb Get rid of token authentication 2013-09-02 19:15:47 -03:00
modules.rb Cleanup trailing whitespace 2013-12-05 09:03:32 +01:00
omniauth.rb Fix indent, remove not used variable 2012-05-15 17:22:52 -03:00
parameter_filter.rb Rename ParamFilter to ParameterFilter for consistency 2013-06-19 09:17:54 +02:00
parameter_sanitizer.rb Add Rails 4 related todo 2013-10-31 14:40:44 +01:00
rails.rb Only raise on missing secret key after a route is defined 2013-08-18 09:55:05 +02:00
test_helpers.rb passes headers through test helpers' response 2013-08-09 09:51:05 +02:00
time_inflector.rb Cleanup trailing whitespace 2013-12-05 09:03:32 +01:00
token_generator.rb Move to SHA256 2013-08-06 12:14:51 +02:00
version.rb Release v3.2.2 2013-11-25 12:00:21 +01:00