Compatibility with Rails 4

This commit addresses incompatibility issues with Rails 4. Among other things it removes the attr_accessible calls if run inside Rails 4, since those are supposed to be addressed by the controller now.