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) }
```