devpuppy/trebuchet — pull request #2 by ssorallen (2012-05-03 23:20:57+00:00)
Title: Check for User.id before accessing it

If a user object has not been saved and therefore doesn't have an ID, it currently raises an error:

```ruby
NoMethodError:
undefined method `+' for nil:NilClass
# ./lib/trebuchet/strategy/percentage.rb:14:in `launch_at?
# ./lib/trebuchet/feature.rb:30:in `launch_at?'
# ./lib/trebuchet.rb:47:in `launch?'
# ./spec/percentage_strategy_spec.rb:11:in `block (2 levels) in '
```

Trebuchet will now return `false` for users without IDs instead of raising an error.