ddnexus / flex

The ultimate ruby client for elasticsearch.
http://ddnexus.github.io/flex/doc/
72 stars 15 forks source link

Disable flex in certain environment #10

Closed siuying closed 11 years ago

siuying commented 11 years ago

In certain case I would like to disable flex in my rails model (e.g. during testing). Are there anyway I can do this? (Sorry if this is not the right place to ask)

ddnexus commented 11 years ago

Not sure to understand what you mean with "disable flex", but you should probably wrap the inclusion of the flex module and the flex call into some condition.

siuying commented 11 years ago

Thanks! That will do. Just wonder if there are any built-in ways.