daddyz/phonelib — pull request #30 by jkaipr (2014-07-07 14:05:57+00:00)
Title: switched checking back to defined? Rails, ActiveModel didn't work in Rails 4.1.4

PhoneValidator didn't load in Rails 4.1.4.
---------------------------------------------------
ActiveModel wasn't defined while phonelib.rb was called, so this condition doesn't pass
```ruby
autoload :PhoneValidator, 'validators/phone_validator' if defined? ActiveModel
```
Switched checking back to
```ruby
if defined? Rails
```
as it was before.

This occurred while using the gem in and Rails Engine.
Not sure if there is a better way to solve it, this works well enough for me.