I have multiple model methods and I want to loop and execute through each of them. How would I perform this in rails 2.3.11? Preferably in a begin/rescue.
Edit:
Thanks maprihoda, I used your example and was able to apply it with the begin/rescue:
class MyModel
def method_1
puts 'In method_1'
end
def method_2
puts 'In method_2'
end
def method_3
%w( method_1 method_2).each { |m|
begin
self.send(m)
rescue => e
puts "#{e.message}"
end
}
end
end
Something like this?