yammer/sched.do — pull request #269 by adarshpandit (2013-01-07 20:56:38+00:00)
Title: Fix Guest validation error

* Guest login was failing because name validation wasn't occurring until after save
* Moved setting of has_ever_logged in earlier in flow
* Remove bang to `Guest#has_ever_logged_in`, which should always raise an exception

Refactoring
-----------

* Extract frequently used Event.find method
* Extract Guest find_or_initialize method
* Use instance variables when calling private methods in GuestController
* Move event_id session setting to private method
* Remove Guest#initialize_with_name_and_email
* Remove Guest#set_has_ever_logged_in (replaced with update_attributes)
* Shorten Guest specs to use FactoryGirl.create instead of save!
* Refactor Guest specs to test Guest.find_or_initialize_by_email (probably unnecessary since this is a core method)
* Give before_filter a more intention-revealing name
* Use bang method when finding things in Controllers

Minor
-----

* Add acceptance test
* Sort guest_steps by use case and test phase (Given/When/Then)
* Break long lines
* Sort private methods

Trello:
https://trello.com/card/exception-when-guests-try-to-login-without-a-name/50b3ffc4c7cd26072c00ebfd/156