Skip to content

Conversation

@desmondmonster
Copy link

Here's progress so far:

  • removed observer support & tests
  • ActiveSupport Logger default format changed; made tests care more about relevant details
  • mimicked mass assignment sanitizing that was relied on to remove an :index key before model attributes were set

TODO:

  • create a compatibility module to adapt mass-assignment method calls
  • Dirty tests are still failing. If you inspect the post.changes hash on spec/examples/dirty_spec.rb:227, instead of having the two comments it has two nils. I haven't figured out yet why this is so. Open to suggestions, but meanwhile will keep digging.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't one just check for defined? ActiveModel::MassAssignmentSecurity or somesuch?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still a WIP- wasn't sure how much work would be needed for
compatibility and how far-reaching the changes would be. Perhaps a module
will be overkill.

On Wednesday, August 7, 2013, Mat Brown wrote:

In lib/elastictastic/mass_assignment_security.rb:

@@ -2,12 +2,18 @@ module Elastictastic
module MassAssignmentSecurity
extend ActiveSupport::Concern

  • included do
  •  include ActiveModel::MassAssignmentSecurity
    
  • end
  • if ActiveModel.version.version < '4.0'

Couldn't one just check for defined? ActiveModel::MassAssignmentSecurityor somesuch?


Reply to this email directly or view it on GitHubhttps://github.com//pull/32/files#r5645039
.

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

Successfully merging this pull request may close these issues.

2 participants