Carlos Antonio da Silva
dcbfb32e66
Merge pull request #5640 from nmaggioni/nm_config_template_typo
...
Fix typo in config template
2023-10-11 11:41:16 -03:00
Junichi Ito
49ed129c40
Replce p tag with div since p tags cannot contain other block elements
2023-02-14 08:34:26 +09:00
Carlos Antonio da Silva
f08e0ad24a
Integrate with Hotwire/Turbo by configuring error and response statuses
...
Treat `:turbo_stream` request format as a navigational format, much like
HTML, so Devise/responders can work properly.
Allow configuring the `error_status` and `redirect_status` using the
latest responders features, via a new custom Devise responder, so we can
customize the both responses to match Hotwire/Turbo behavior, for
example with `422 Unprocessable Entity` and `303 See Other`,
respectively. The defaults aren't changing in Devise itself (yet), so it
still responds on errors cases with `200 OK`, and redirects on non-GET
requests with `302 Found`, but new apps are generated with the new
statuses and existing apps can opt-in. Please note that these defaults
might change in a future release of Devise.
PRs/Issues references:
https://github.com/heartcombo/devise/pull/5545
https://github.com/heartcombo/devise/pull/5529
https://github.com/heartcombo/devise/pull/5516
https://github.com/heartcombo/devise/pull/5499
https://github.com/heartcombo/devise/pull/5487
https://github.com/heartcombo/devise/pull/5467
https://github.com/heartcombo/devise/pull/5440
https://github.com/heartcombo/devise/pull/5410
https://github.com/heartcombo/devise/pull/5340
https://github.com/heartcombo/devise/issues/5542
https://github.com/heartcombo/devise/issues/5530
https://github.com/heartcombo/devise/issues/5519
https://github.com/heartcombo/devise/issues/5513
https://github.com/heartcombo/devise/issues/5478
https://github.com/heartcombo/devise/issues/5468
https://github.com/heartcombo/devise/issues/5463
https://github.com/heartcombo/devise/issues/5458
https://github.com/heartcombo/devise/issues/5448
https://github.com/heartcombo/devise/issues/5446
https://github.com/heartcombo/devise/issues/5439
2023-01-31 11:02:01 -03:00
Alex Ghiculescu
80423c8f01
Fix deprecation warning on Rails 6.1
2021-02-02 15:37:45 -07:00
Carlos Antonio da Silva
057afdc1e6
Fix another thor deprecation warning in the install generator
...
This one has been showing up when running tests:
Deprecation warning: Expected string default value for '--orm'; got false (boolean).
This will be rejected in the future unless you explicitly pass the options
`check_default_type: false` or call `allow_incompatible_default_type!` in your code
You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.
2020-06-18 18:02:43 -03:00
David Rodríguez
ffa8a80f42
Fix warning from thor
...
The `:orm` option can also have string values.
2020-06-18 16:21:58 +02:00
Carlos Antonio da Silva
14a3084b59
Simplify the view generator with scoped views
2020-06-07 19:16:36 -03:00
Hiroyuki Morita
1f30f6fa85
Remove unused method from Devise::Generators::InstallGenerator
...
`rails_4?` is not called anymore since 2024fca4df .
2020-04-23 08:19:21 +09:00
HLFH
d65bb156c1
type: :boolean for :orm
2020-03-28 09:13:35 +00:00
Gaspard d'Hautefeuille
6851f1d1c4
Deprecation warning: Expected string default value for '--orm'
2020-03-26 17:13:51 +00:00
Petrik
63fe1a843f
Explain how changing stretches affects existing password hashes
2020-03-12 16:16:55 +01:00
Rafael Mendonça França
a17abad57a
Remove all references to Plataformatec
2020-02-03 11:33:17 -05:00
Colin Ross
14863ba4c9
Documentation: Details/Notes regarding Rails API-only applications ( #5152 )
...
* doc: Add some additional details concerning using devise in an API-only Rails application
* Apply wording suggestions from code review
Co-Authored-By: Marcos Ferreira <mracos@users.noreply.github.com >
* Apply suggestions from code review
Co-Authored-By: Marcos Ferreira <mracos@users.noreply.github.com >
2019-10-29 15:06:37 -03:00
Ryan Lue
5d73e1e3bb
Explain layout of default config initializer [ci skip]
2019-09-27 06:21:27 +08:00
Marcos Ferreira
f48b6f1651
Merge pull request #5067 from shobhitic/master
...
Using scoped errors for scoped views. Fixes #5066
2019-09-17 14:49:57 -03:00
Marcos Ferreira
b52e642c01
Merge pull request #5074 from sergey-alekseev/increase-default-stretches-to-12
...
Increase default stretches to 12
2019-09-17 13:30:55 -03:00
Rafael Mendonça França
54fb582269
Officially support Rails 6.0
...
Also remove upper bound on railties so people can try devise with new
versions without having to wait us to change the gem and report bugs.
2019-06-12 16:10:13 -04:00
Sergey Alekseev
63ea6533de
increase default stretches to 12
...
Test script
---
```ruby
require 'bcrypt'
require 'benchmark'
Benchmark.measure { BCrypt::Password.create('password', cost: 12) }
```
Test results
---
- [Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz](https://ark.intel.com/content/www/us/en/ark/products/97535/intel-core-i5-7360u-processor-4m-cache-up-to-3-60-ghz.html ): `#<Benchmark::Tms:0x00007fdd00a4eb30 @label="", @real=0.21730700000080105, @cstime=0.0, @cutime=0.0, @stime=0.00020399999999999585, @utime=0.21685199999999996, @total=0.21705599999999997>`
- [Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz](https://ark.intel.com/content/www/us/en/ark/products/137979/intel-core-i7-8559u-processor-8m-cache-up-to-4-50-ghz.html ): `#<Benchmark::Tms:0x00007fe91094fd30 @label="", @real=0.17964200000278652, @cstime=0.0, @cutime=0.0, @stime=7.399999999996298e-05, @utime=0.17950799999999845, @total=0.1795819999999984>`
Other gems
---
- bcrypt-ruby which is used by devise [updated](https://github.com/codahale/bcrypt-ruby/pull/181 ) their default cost to 12 (not released a gem version yet).
- rails has [a PR](https://github.com/rails/rails/pull/35321 ) from the Rails core team member to update their `ActiveModel::SecurePassword` which powers `has_secure_password` default cost to 13 (not merged yet).
Previous changes
---
[Previous PR](https://github.com/plataformatec/devise/pull/3549 ) to increase the default stretches to 12 was created more than 4 years ago. That time the default stretches value [was increased](9efc601c73 ) from 10 to 11.
2019-05-11 19:35:13 +03:00
Shobhit Bakliwal
a823e510f3
Using scoped errors for scoped views. Fixes #5066
2019-05-02 13:24:01 +05:30
Lucas Ferreira
964ae53e5b
Update password confirmation autocomplete
2019-04-02 18:39:19 -03:00
Hyeonseok
369ba267ef
removing white space in devise generator new.html.erb ( #5010 )
2019-01-24 10:20:03 -02:00
kenji kobayashi
e3a00b27d1
Add an option to not automatically sign in a user after changing a password ( #4569 )
2018-12-28 11:29:58 -02:00
Kopylov Vladislav
6f140faf0d
fixed description for Devise::Generators::ControllersGenerator ( #4975 )
2018-11-21 19:20:23 -02:00
John Gabriel
fa067b31c6
chore(docs): allow_unconfirmed_access_for = nil ( #2275 ) ( #4964 )
2018-11-12 14:27:27 -02:00
Sam Weerasinghe
94adec3cee
Issue #4941 , handle error 'Please specify the Rails release the migration was written for' ( #4942 )
2018-10-03 15:21:59 -03:00
Colin Ross
389cd85d47
Missing comma in form input
2018-09-19 18:19:56 -07:00
Samy Kacimi
af8f7e9797
remove :trackable from the default modules ( #4857 )
...
This removes :trackable from the default modules in the generators,
to be more GDPR-friendly.
2018-05-14 18:11:15 -03:00
Gustavo Bazan
cd9ad848fb
Update simple form templates
...
Update `simple_form` templates with changes from 16b3d6d67c and 6260c29a86
2018-05-08 15:42:26 -03:00
Wolfram Nikolas Müller
2bb8e1c236
Fix missing do block in config
2018-03-29 15:32:46 -03:00
Wolfram Nikolas Müller
e44a8b2d43
Include configuration for Turbolinks in devise initializer template
2018-03-29 15:32:46 -03:00
Danilo Araújo Silva
8ab7963e50
Creating a new section for controller configuration on devise.rb template
...
Creating a new section called `Controller configuration`.
An optional devise configuration is set `config.parent_controller` but this configuration is missing in the `devise.rb` template file.
2018-03-14 15:09:04 -03:00
Filip Soszyński
b01ae718b3
Primary key type in migration template ( #4426 )
...
* Tests
* Add primary key type to migration template
* Change Rails version-detecting method in test
2017-12-23 17:20:45 -02:00
Rafael França
0720bc72c3
Merge pull request #4731 from alexhifer/master
...
Added the ability to change the default migrations path
2017-12-21 18:33:07 -05:00
Pat Allan
f39c6fd927
Add the frozen_string_literal pragma comment to all Ruby files. ( #4725 )
2017-12-21 15:36:29 -02:00
Alexey Degtyarev
12298ef968
Added the ability to change the default migrations path (introduced in Rails 5.0.3)
2017-12-21 17:12:19 +02:00
masatooba
a24f98f315
Delete unnecessary hide! method
...
This method has already been added to Rails.
2017-10-28 01:26:26 +09:00
Pat Allan
4e9860d268
Ensure string literals can be frozen.
2017-06-21 09:22:49 +10:00
Rafael França
ad8547dede
Merge pull request #4381 from slbug/master
...
remove warnings about default value with new thor
2017-06-13 15:51:20 -04:00
Carlos Antonio da Silva
ce071502ee
Display unconfirmed email when using reconfirmable and email changed notification
...
Otherwise we'd be mistakenly displaying the original email in the
message (which is the same we're sending the message to).
Also tweak the messaging a bit in this case, to show that the email "is
being changed" (the change hasn't taken effect yet).
Related to #4455 .
2017-03-15 11:47:47 -03:00
Carlos Antonio da Silva
2135ae5e5e
Change email_change => email_changed notification
...
This better indicates what the setting is for, and when it's supposed to
be triggered.
We might eventually deprecate the existing password_change on in favor
of password_changed.
2017-03-10 08:56:34 -03:00
Carlos Antonio da Silva
70eb18d766
Notify original user email when the email changes
...
This adds a new setting `send_email_change_notification` which will
send an email to the original user email when their email is updated to
a new one.
It doesn't take into account the reconfirmable setting yet, it will be
added next, so that if confirmable is included and reconfirmable is
being used, the email will be triggered when the email change is
requested, not when confirmed (e.g when we store the email in
`unconfirmed_email`, not when it's later copied to `email` when that is
confirmed).
2017-03-06 17:04:26 -03:00
Alexander Grebennik
47077bf810
fix warnings about default value with new thor
2016-12-20 02:14:41 +03:00
amingilani
83b88353b5
Fix indentation in generators
2016-07-15 13:22:51 +05:00
Maarten van Vliet
8286325fd0
Remove reference to Rails 3.2 in post-install text ( #4094 )
2016-05-08 13:41:46 -03:00
Lucas Mazza
db8e247aa5
Document reload_routes on the app file template.
2016-05-05 17:23:05 -03:00
kimgb
830d3e86ee
updated email_regexp and added test cases ( #4001 )
...
Add a more permissive default e-mail regex.
2016-04-26 11:13:07 -03:00
Ulisses Almeida
164134c78a
Add warning about default config change
...
This change add warnings for these configurations:
* strip_whitespace_keys - It is already explicit on config template, now
it will be the same of the template.
* email_regexp - In the new version this regexp will be more
permissive.
* reconfirmable - It is already explicit on config template, now
it will be the same of the template.
* skip_session_storage - It is already explicit on config template, now
it will be the same of the template.
* sign_out_via - It is already explicit on config template, now
it will be the same of the template.
These ones is important to change, since the configuration says current
explicit value are the default. It can lead to misunderstanging if users
remove the explicit configuration.
It also updates the template explicit values:
* Warns the `config.mailer_sender` is nil by default
* Update `config.password_length` to use the current default
* Make the e-mail configuration explicit
2016-04-15 20:31:54 -03:00
bogdanvlviv
0f11c0f6b3
fix method name for File
2016-04-12 09:03:54 +03:00
Lucas Mazza
353b14f473
Use versioned migrations when possible
...
Rails 5 deprecates inheriting directly from `ActiveRecord::Migration` in
favor of inheriting from `ActiveRecord::Migration[5.0]` where `5.0` is
the `major.minor` version of Rails that the migration was originally
written to support.
h/t to b0ce189c69 .
2016-03-07 11:38:37 -03:00
Lucas Mazza
c228227bc1
Tweak no ORM check on InstallGenerator.
...
* Expand the explanation of why it fail.
* Raise a subclass of `Thor::Error` so the Thor doesn't output the exception
backtrace as it isn't useful for developers facing this error.
2016-02-15 10:16:43 -02:00