Make resource and collection ivars "private"
Remove railties dependency for Rails 4 compatibility