See https://github.com/rails/rails/pull/5345 for https://github.com/rails/rails/issues/5381 for background. AR models live somewhere between simple data structure (Hash) and domain objects with arbitrarily complex behavior.#5345<https://github.com/rails/rails/issues/5345> introduces slice to the model API, which makes it feel more like a data structure. I propose that: 1. AR::Base includes Enumerable 2. Add a method to declare a list of method names that should be treated as hash keys 3. implement each to iterate over the attributes hash with the declared methods (and their values) merged in This would effectively allow users to pass AR models to any method that operates on a Hash. Thoughts? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/8UnoCWZ3RFgJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.