The Array Argument (aka. *)
Wednesday’s post on acts_as_locateable didn’t do much to explain what the patch to the plugin’s methods was doing to allow us to pass extra arguments to ActiveRecord#find. The secret is in the *, or array argument. A normal method will have a fixed number of arguments: def simple_method(first, second, third) puts "#{first} : #{second} : #{third}" end simple_method('one', 'two', 'three') >> one : two : three and sometimes we can develop that by allowing default values for those arguments: ...