README.mdown in scoped_from-0.2 vs README.mdown in scoped_from-0.3
- old
+ new
@@ -64,10 +64,12 @@
`created_between` in the above code).
Scopes with no argument are invoked if parameter value is evaluated as `true`.
It includes `"true"`, `"yes"`, `"y"`, `"on"`, and `"1"` strings.
+Columns are also automatically scoped.
+
## Scopes restriction
You can restrict mapping to some scopes with `:only` option:
@posts = Post.scoped_from(params, :only => ['commented', 'search'])
@@ -98,17 +100,13 @@
is equivalent to
@posts = Post.search('bar').search('foo')
-By default, blank parameter values are ignored, you can include them with
-`:include_blank` option:
+You may also not want to filter on columns, just specify `:exclude_columns`
+option:
- @posts = Post.scoped_from(params, :include_blank => true)
-
-You may also want to filter on columns, just specify `:include_columns` option:
-
- @posts = Post.scoped_from(params, :include_columns => true)
+ @posts = Post.scoped_from(params, :exclude_columns => true)
A query string can also be given to `scoped_from` method:
@posts = Post.scoped_from('with_category=24&search[]=foo&search[]=bar')