Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 4.1 breaks models/response_set_spec #482

Open
kjayma opened this issue Aug 9, 2014 · 0 comments
Open

Rails 4.1 breaks models/response_set_spec #482

kjayma opened this issue Aug 9, 2014 · 0 comments

Comments

@kjayma
Copy link

kjayma commented Aug 9, 2014

response_set_specs fails in "describe 'as a quiz'".

The ResponseSet.correctness_hash method tries to call the Ruby compact method against the self.responses ActiveRecord relation.

The release notes for Rails 4.1 indicates:

Relation no longer has mutator methods like #map! and #delete_if. Convert to an Array by calling #to_a before using these methods. (Pull Request)

The blacklisted methods include compact (See changes to activerecord/lib/active_record/relation/delegation.rb in the pull request) and therefore breaks the code in correctness_hash.

P.S. - I realize 4.1 is not yet officially supported, but most of the code works well in 4.1.

kjayma added a commit to kjayma/surveyor that referenced this issue Aug 10, 2014
ActiveRecord relations no longer support the compact method
directly.  Use to_a first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant