Can someone please tell me what
send(\"#{Model.find...}\")
is and does?
Another example, similar to Antonio Jha's https://stackoverflow.com/a/26193804/1897857
is if you need to read attributes on an object.
For example, if you have an array of strings, if you try to iterate through them and call them on your object, it won't work.
atts = ['name', 'description']
@project = Project.first
atts.each do |a|
puts @project.a
end
# => NoMethodError: undefined method `a'
However, you can send the strings to the object:
atts = ['name', 'description']
@project = Project.first
atts.each do |a|
puts @project.send(a)
end
# => Vandalay Project
# => A very important project