This repository has been archived by the owner on Jun 30, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#446] Changed, that arbitrary objects passed in the
:as
mapping op…
…tion are indexed Previously, objects other then `String` or `Proc` were silently discarded when evaluating the `:as` mapping option. With this change, you may pass whatever object you like in the `:as` mapping option: class MyModel include Some::ORM include Tire::Model::Search mapping do indexes :field, :type => 'string', :analyzer => 'keyword', :as => SomeOtherObject.whatever end end end class MyModel include Some::ORM include Tire::Model::Search mapping do indexes :field, :type => 'string', :analyzer => 'keyword', :as => [1, 2, 3] end end end This commit is a conceptual opposite of 0ccee42. Until #446 is decided, this change brings some consistency to the behaviour.
- Loading branch information