Sha256: d8e990fde1523b449adcce7a050332bd8ab32a0809bc77d554c91ed97d1c21be

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

# Changelog

## Version 1.1.3 (unreleased)

* __[feature]__ Passing nil as `scope` in constructor, falls back to default scope (@rstankov)

## Version 1.1.2

* __[fix]__ Fix a warning due to Rails 5 `ActionController::Parameters` not being a Hash (@rstankov)
* __[fix]__ Ensure `sort_by` prefixes with table_name. (@andreasklinger)

## Version 1.1.1

* __[fix]__ Fix a bug in inheriting search objects (@avlazarov)

## Version 1.1

* __[feature]__ Search objects now can be inherited  (@rstankov)

 ```ruby
 class BaseSearch
   include SearchObject.module

   # ... options and configuration
 end

 class ProductSearch < BaseSearch
   scope { Product }
 end
 ```

* __[feature]__ Use instance method for straight dispatch (@gsamokovarov)

  ```ruby
  class ProductSearch
    include SearchObject.module

    scope { Product.all }

    option :date, with: :parse_dates

    private

    def parse_dates(scope, value)
      # some "magic" method to parse dates
    end
  end
  ```

## Version 1.0

* __[feature]__ Added min_per_page and max_per_page to paging plugin (@rstankov)

* __[change]__ Default paging behaves more like 'kaminari' and 'will_paginate' by treating 1 page as 0 index (__backward incompatible__) (@rstankov)

* __[feature]__ Raise `SearchObject::MissingScopeError` when no scope is provided (@rstankov)

* __[change]__ Replace position arguments with Hash of options (__backward incompatible__) (@rstankov)

  ```diff
  - Search.new params[:f], params[:page]
  + Search.new filters: params[:f], page: params[:page]
  ```

## Version 0.2

* __[feature]__ Added `.results` shortcut for `new(*arg).results` (@rstankov)

* __[fix]__ Fix wrong limit and offset in default paging (@rstankov)

## Version 0.1

* Initial release (@rstankov)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
search_object-1.1.3 CHANGELOG.md