rails/rails — pull request #13264 by laurocaetano (2013-12-11 02:19:16+00:00)
Title: Prevent invalid code when using dynamic finders with reserved ruby word.

Prevent invalid code when using dynamic finders with Ruby's reserved words. The dynamic finder was creating the method signature with the parameters name, which may have reserved words and this way creating invalid Ruby code.

Closes: #13261

Example:

# Before
Dog.find_by_alias('dog name')

# Was creating this method
def self.find_by_alias(alias, options = {})

# After
Dog.find_by_alias('dog name')

# Will create this method
def self.find_by_alias(_alias, options = {})