Make generated scopes compatible with Rails 4

Rails 4 requires all scopes to use a callable object (Proc or lambda).

So this:
```
scope name.to_sym, where(attr_name => name.to_s)
```


Should now be:
```
scope name.to_sym, -> { where(attr_name => name.to_s) }
```

There are no tests for this change as I'm not really sure how to go about testing it. If you've got any suggestions please let me know and I'll add them in.