rails / protected_attributes

Protect attributes from mass-assignment in ActiveRecord models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

super: no superclass method `subclass_from_attributes?' for #<Class:0x007fe284c484c0>

krainboltgreene opened this issue · comments

def new
  @_design = @_crowdshop.fans.new
end
vendor/ruby/2.0.0/gems/activerecord-4.0.3/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
vendor/ruby/2.0.0/gems/protected_attributes-1.0.6/lib/active_record/mass_assignment_security/inheritance.rb:13:in `subclass_from_attributes?'
vendor/ruby/2.0.0/gems/activerecord-4.0.3/lib/active_record/inheritance.rb:22:in `new'
vendor/ruby/2.0.0/gems/protected_attributes-1.0.6/lib/active_record/mass_assignment_security/reflection.rb:6:in `build_association'
vendor/ruby/2.0.0/gems/protected_attributes-1.0.6/lib/active_record/mass_assignment_security/associations.rb:5:in `build_record'
vendor/ruby/2.0.0/gems/protected_attributes-1.0.6/lib/active_record/mass_assignment_security/associations.rb:19:in `build'
vendor/ruby/2.0.0/gems/protected_attributes-1.0.6/lib/active_record/mass_assignment_security/associations.rb:55:in `build'

Ouch, that was supposed to work with the old method with 6b59a5b, but the super call looks for the new method instead. Fixing that.

@krainboltgreene can you try with current protected_attributes master please? Thanks.

Will do, thanks for the amazingly fast quick attention. Pulling now.

@krainboltgreene cool, just released 1.0.7 with the fix. Thanks for reporting and testing!