adzap / validates_timeliness

Date and time validation plugin for ActiveModel and Rails. Supports multiple ORMs and allows custom date/time formats.
MIT License
1.59k stars 227 forks source link

Useless code in initializer file created by Installation guide #184

Closed kamillle closed 5 years ago

kamillle commented 5 years ago

Hi there.

I think the Installation on README.md provides us with useless code.

When execute bundle exec rails generate validates_timeliness:install, initializer file is created. The file includes config.extend_orms = [ :active_record ]. This code in initializer file is useless because if this gem is installed in Rails applications, ActiveRecord is also installed, that means ActiveRecord will be extended by this gem due to railtie code.

I'm not sure above opinion hundred percent, so let me know your opinion. 🙇

kamillle commented 5 years ago

BTW, my application that install this gem does not have initializer file is working without any errors.

adzap commented 5 years ago

True is not needed when run in a Rails app with ActiveRecord loaded. Can probably just comment it out.