YaleSTC/reservations — pull request #589 by squidgetx (2014-06-27 17:32:51+00:00)
Title: Blackout Bugs

The recurring blackout method for setting the id is in need of refactoring. It currently reads as `params_hash[:set_id] = Blackout.last.id.to_i + 1`

If there are no blackouts, `Blackout.last` will return nil, raising a `RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id`

Also, the code will attempt to mass-assign the params attribute`:days`, which is raising a silent warning in runtime but raises a full error in rspec.