I have a worker :
module A
class B
@queue = :a_b
def self.perform(*args)
...............
city = City.where(:country_id => 1).first
city.update_attributes(name: "Delhi", continent: "Asia") //mass-assignment here
...............
end
end
end
I don't have attr_accessible :name, :continent
in city.rb
. How should I remove this mass-assignment from the worker?
check the link https://github.com/rails/strong_parameters about how to use strong parameter out of controller.