title: Rails NoMethodError (undefined method `id'...) while using 'protected attributes' gem
body: <p>I'm using the 'protected_attributes' gem in Rails that brings back explicit <code>attr_accessible</code> to Rails 4 (which I needed for compatibility with another Gem, long story). </p>
  
  <p>In the process of writing code, I tried to access an attribute that isn't named as accessible. I received the following error:</p>
  
  <pre><code>NoMethodError (undefined method `id' for #&lt;ActiveRecord::Relation::ActiveRecord_Relation_User:0x00000104c51c00&gt;):
  </code></pre>
  
  <p>Realizing my mistake, I added <code>:id</code> with the rest of my <code>attr_accessible</code> list. However, even after restarting the rails server, I still get the same exact error every time I run the code. This had happened to me before and what I did was a <code>rake db:reset</code> which, for whatever reason, fixed my issues (but nuked my db in the process). I'd rather not wipe out my database again... Is there a simpler way to fix this? Some cache I'm not clearing or something? Thanks.</p>
  
  <p><strong>Edit: for those interested, this is the full trace:</strong></p>
  
  <pre><code>activerecord (4.0.0) lib/active_record/relation/delegation.rb:121:in `method_missing&amp;#39;
  activerecord (4.0.0) lib/active_record/relation/delegation.rb:68:in `method_missing&amp;#39;
  app/controllers/api/v1/superusers.rb:17:in `block (2 levels) in &amp;lt;class:Users&amp;gt;&amp;#39;
  grape (0.7.0) lib/grape/endpoint.rb:31:in `call&amp;#39;
  grape (0.7.0) lib/grape/endpoint.rb:31:in `block in generate_api_method&amp;#39;
  grape (0.7.0) lib/grape/endpoint.rb:407:in `call&amp;#39;
  grape (0.7.0) lib/grape/endpoint.rb:407:in `run&amp;#39;
  grape (0.7.0) lib/grape/endpoint.rb:156:in `block in call!&amp;#39;
  grape (0.7.0) lib/grape/middleware/base.rb:24:in `call&amp;#39;
  grape (0.7.0) lib/grape/middleware/base.rb:24:in `call!&amp;#39;
  grape (0.7.0) lib/grape/middleware/base.rb:18:in `call&amp;#39;
  grape (0.7.0) lib/grape/middleware/base.rb:24:in `call!&amp;#39;
  grape (0.7.0) lib/grape/middleware/base.rb:18:in `call&amp;#39;
  grape (0.7.0) lib/grape/middleware/error.rb:26:in `block in call!&amp;#39;
  grape (0.7.0) lib/grape/middleware/error.rb:25:in `catch&amp;#39;
  grape (0.7.0) lib/grape/middleware/error.rb:25:in `call!&amp;#39;
  grape (0.7.0) lib/grape/middleware/base.rb:18:in `call&amp;#39;
  rack (1.5.2) lib/rack/head.rb:11:in `call&amp;#39;
  rack (1.5.2) lib/rack/builder.rb:138:in `call&amp;#39;
  grape (0.7.0) lib/grape/endpoint.rb:157:in `call!&amp;#39;
  grape (0.7.0) lib/grape/endpoint.rb:145:in `call&amp;#39;
  rack-mount (0.8.3) lib/rack/mount/route_set.rb:152:in `block in call&amp;#39;
  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:96:in `block in recognize&amp;#39;
  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:68:in `optimized_each&amp;#39;
  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:95:in `recognize&amp;#39;
  rack-mount (0.8.3) lib/rack/mount/route_set.rb:141:in `call&amp;#39;
  grape (0.7.0) lib/grape/api.rb:537:in `call&amp;#39;
  grape (0.7.0) lib/grape/api.rb:44:in `call!&amp;#39;
  grape (0.7.0) lib/grape/api.rb:40:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call&amp;#39;
  rack (1.5.2) lib/rack/etag.rb:23:in `call&amp;#39;
  rack (1.5.2) lib/rack/conditionalget.rb:35:in `call&amp;#39;
  rack (1.5.2) lib/rack/head.rb:11:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/flash.rb:241:in `call&amp;#39;
  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context&amp;#39;
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/cookies.rb:486:in `call&amp;#39;
  activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call&amp;#39;
  activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call&amp;#39;
  activerecord (4.0.0) lib/active_record/migration.rb:369:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call&amp;#39;
  activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__3113182128831505771__call__callbacks&amp;#39;
  activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/reloader.rb:64:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call&amp;#39;
  railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app&amp;#39;
  railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call&amp;#39;
  activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged&amp;#39;
  activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged&amp;#39;
  activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged&amp;#39;
  railties (4.0.0) lib/rails/rack/logger.rb:21:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call&amp;#39;
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call&amp;#39;
  rack (1.5.2) lib/rack/runtime.rb:17:in `call&amp;#39;
  activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call&amp;#39;
  rack (1.5.2) lib/rack/lock.rb:17:in `call&amp;#39;
  actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call&amp;#39;
  railties (4.0.0) lib/rails/engine.rb:511:in `call&amp;#39;
  railties (4.0.0) lib/rails/application.rb:97:in `call&amp;#39;
  rack (1.5.2) lib/rack/lock.rb:17:in `call&amp;#39;
  rack (1.5.2) lib/rack/content_length.rb:14:in `call&amp;#39;
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service&amp;#39;
  /Users/ruben/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service&amp;#39;
  /Users/ruben/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run&amp;#39;
  /Users/ruben/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread&amp;#39;
  </code></pre>