class EatShitController < ApplicationController
# some code
def lets_eat
TriggerForYourPeaceOfShit.call(params[:ids]) # здесь передаешь массив
end
end
class TriggerForYourPeaceOfShit
def call(ids)
YourShittyModel.where(id: ids).each do |your_object|
your_object.toggle(:some_boolean_crap)
end
end
end