rails/activemodel/test
Yves Senn 7d196cf360 #to_param returns nil if to_key returns nil. Closes #11399.
The documentation of `#to_key` (http://api.rubyonrails.org/classes/ActiveModel/Conversion.html#method-i-to_key)
states that it returns `nil` if there are no key attributes. `to_param` needs
to be aware of that fact and return `nil` as well.

Previously it raised the following exception:

```
  1) Error:
ConversionTest#test_to_param_returns_nil_if_to_key_is_nil:
NoMethodError: undefined method `join' for nil:NilClass
    /Users/senny/Projects/rails/activemodel/lib/active_model/conversion.rb:65:in `to_param'
    /Users/senny/Projects/rails/activemodel/test/cases/conversion_test.rb:34:in `block in <class:ConversionTest>'
```
2014-02-04 10:27:46 +01:00
..
cases #to_param returns nil if to_key returns nil. Closes #11399. 2014-02-04 10:27:46 +01:00
models Removed old tests 2014-01-24 19:49:31 -08:00
validators This is not an executable file 2010-12-16 01:49:28 +05:30
config.rb Make Active Model test suite similar to Active Record 2009-03-20 10:32:24 +00:00