Work around removed attribute_methods_generated? in Rails 4.0.4
Merge pull request #333 from VictorLowther/fix-rails-4.0.4

Work around removed attribute_methods_generated? in Rails 4.0.4