... | @@ -4,7 +4,7 @@ Provides a way to write auxiliary statements for use in a larger query. It's rec |
... | @@ -4,7 +4,7 @@ Provides a way to write auxiliary statements for use in a larger query. It's rec |
|
|
|
|
|
### Model
|
|
### Model
|
|
|
|
|
|
First you need to configure the statements you want to use. These statements are very similar to scopes, but with a little more options:
|
|
First, you need to configure the statements you want to use. These statements are very similar to scopes, but with a little more options:
|
|
```ruby
|
|
```ruby
|
|
# models/user.rb
|
|
# models/user.rb
|
|
class User < ActiveRecord::Base
|
|
class User < ActiveRecord::Base
|
... | | ... | |