inossidabile
inossidabile

Reputation: 524

Filtering integer field with a range

By default filter :foo where foo is an integer field will produce the equality filter. Are there any built-in ways to make it act just like date filter: to draw two inputs that will work like a range?

Upvotes: 3

Views: 1847

Answers (1)

Fivell
Fivell

Reputation: 11929

No there is no such default one, but it's very easy to create it by yourself.

please see my gist with example https://gist.github.com/3995659

put it in initializers directory

use it like

 filter :id , :as => :numeric_range

Upvotes: 4

Related Questions