rails-sqlserver/activerecord-sqlserver-adapter — pull request #216 by sixfeetover (2012-07-30 15:20:33+00:00)
Title: Allow named parameters in stored procedures

This change allows calling stored procedures with named parameters, e.g:

```ruby
execute_procedure :my_procedure, param_1: 'foo', param_2: 'bar'
execute_procedure :my_procedure, param_2: 'bar', param_1: 'foo'
execute_procedure :my_procedure, param_2: 'bar'
```

all work fine (assuming `@param_1` has a default value in the last example).

This is helpful when you need to call a dynamically call a procedure but don't know or don't care about the exact order of the procedure's parameters.

I've prevented SQL injection in parameter names by forcing parameter names to not contain spaces. If that doesn't feel robust enough for protection, I'd be happy to brainstorm other options.

I've added tests for this and the full test suite is passing.