diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-02-20 17:09:05 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-03-06 17:41:25 +0300 |
commit | 0ef8a643489ad1a3da4431155326f0a6e206d870 (patch) | |
tree | beb7bceb362f627e4864075e76d05e81f9b743da /db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb | |
parent | 9cc0ff8f468c54e23172492d97f6d9b428d3ad2e (diff) |
Remove unecessary calls to limit_user!, UniqueIps Middleware, and address MR review
- cleanup formating in haml
- clarify time window is in seconds
- cleanup straneous chunks in db/schema
- rename count_uniqe_ips to update_and_return_ips_count
- other
Diffstat (limited to 'db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb')
-rw-r--r-- | db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb b/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb index 2aa305f6b58..cbcf9a30b3c 100644 --- a/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb +++ b/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb @@ -4,14 +4,14 @@ class AddUniqueIpsLimitToApplicationSettings < ActiveRecord::Migration disable_ddl_transaction! def up - add_column_with_default(:application_settings, :unique_ips_limit_per_user, :integer, default: 10) - add_column_with_default(:application_settings, :unique_ips_limit_time_window, :integer, default: 3600) - add_column_with_default(:application_settings, :unique_ips_limit_enabled, :boolean, default: false) + add_column_with_default :application_settings, :unique_ips_limit_per_user, :integer, default: 10 + add_column_with_default :application_settings, :unique_ips_limit_time_window, :integer, default: 3600 + add_column_with_default :application_settings, :unique_ips_limit_enabled, :boolean, default: false end def down - remove_column(:application_settings, :unique_ips_limit_per_user) - remove_column(:application_settings, :unique_ips_limit_time_window) - remove_column(:application_settings, :unique_ips_limit_enabled) + remove_column :application_settings, :unique_ips_limit_per_user + remove_column :application_settings, :unique_ips_limit_time_window + remove_column :application_settings, :unique_ips_limit_enabled end end |