Announcing nullalign

28 Sep 2017

Suppose you have a validation like this:

    validates :email, presence: true

Do you have a non-null constraint in your database to back that up? If not, nullalign will tell you. Once you've added gem 'nullalign' to your Gemfile and bundled, just do:

$ bundle exec nullalign
There are presence validators that aren't backed by non-null constraints.
--------------------------------------------------------------------------------
Model              Table Columns
--------------------------------------------------------------------------------
Album              albums: name, owner_id
AttendanceRecord   attendance_records: group_id, attended_at
CheckinLabel       checkin_labels: name, xml
CheckinTime        checkin_times: campus
CustomField        custom_fields: name, tab_id

Nullalign is based on Colin Jones' consistency_fail. I mean really really based on it, as in I copied and pasted over a bunch of the code and changed the module and file names. Also most of the README.

Enjoy!