0

I am migrating an old app to strong parameters and a bit of a wierd issue has come up. I have a Location model and the abbreviated version is:

class Location < ActiveRecord::Base
  include ActiveModel::ForbiddenAttributesProtection
  validates :name, presence: true
end

The problems is that this name variable is giving me a mass-assignment error even when called from the rails cli. Such as:

enter image description here

But I'm not really sure why. Another model Comment is just fine (no validation issue or mass-assignment warning) with or without validations making me thing it isn't some installation issue but possibly somehow either a collision of the name variable or some other issue. Any ideads on how to fix this?

timpone
  • 19,235
  • 36
  • 121
  • 211

0 Answers0