Liooo / dynabute

DYNAmic attriBUTEs for ActiveRecord
MIT License
18 stars 1 forks source link

NoMethodError: undefined method `binds' for #<ActiveRecord::Relation:: #2

Closed ifebrand6 closed 2 years ago

ifebrand6 commented 4 years ago

Request.dynabutes << Dynabute::Field.new( name: 'gender', value_type: 'select', options_attributes: [ { label: 'male' }, { label: 'female' } ] ) when i push the Dynabute:field... to Request.dynabutes obj, it returns a Nomethod error.

CrAsH1101 commented 2 years ago

I don't know if that syntax worked with previous versions of Rails, but I believe proper Rails way would be a better option. Please see ma PR https://github.com/Liooo/dynabute/pull/3