Skip to content

Commit

Permalink
remove :trackable from the default modules (#4857)
Browse files Browse the repository at this point in the history
This removes :trackable from the default modules in the generators,
to be more GDPR-friendly.
  • Loading branch information
Samy Kacimi authored and tegon committed May 14, 2018
1 parent 6c91648 commit af8f7e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions lib/generators/active_record/devise_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def migration_data
t.datetime :remember_created_at
## Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.#{ip_column} :current_sign_in_ip
t.#{ip_column} :last_sign_in_ip
# t.integer :sign_in_count, default: 0, null: false
# t.datetime :current_sign_in_at
# t.datetime :last_sign_in_at
# t.#{ip_column} :current_sign_in_ip
# t.#{ip_column} :last_sign_in_ip
## Confirmable
# t.string :confirmation_token
Expand Down
4 changes: 2 additions & 2 deletions lib/generators/devise/orm_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module OrmHelpers
def model_contents
buffer = <<-CONTENT
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
:recoverable, :rememberable, :validatable
CONTENT
buffer
Expand Down
10 changes: 5 additions & 5 deletions lib/generators/mongoid/devise_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def migration_data
field :remember_created_at, type: Time
## Trackable
field :sign_in_count, type: Integer, default: 0
field :current_sign_in_at, type: Time
field :last_sign_in_at, type: Time
field :current_sign_in_ip, type: String
field :last_sign_in_ip, type: String
# field :sign_in_count, type: Integer, default: 0
# field :current_sign_in_at, type: Time
# field :last_sign_in_at, type: Time
# field :current_sign_in_ip, type: String
# field :last_sign_in_ip, type: String
## Confirmable
# field :confirmation_token, type: String
Expand Down

0 comments on commit af8f7e9

Please sign in to comment.