Sha256: 4268ea620420cc2d21be128cd6be616e2b3a4dc6393c0f1a6a152f3437a5e55a
Contents?: true
Size: 364 Bytes
Versions: 18
Compression:
Stored size: 364 Bytes
Contents
module Admin::Resources::DataTypes::IntegerHelper def integer_filter(filter) values = set_context.send(filter.to_s.pluralize).to_a items = [[Typus::I18n.t("Show by %{attribute}", :attribute => @resource.human_attribute_name(filter).downcase), ""]] array = values.first.is_a?(Array) ? values : values.map { |i| [i, i] } items += array end end
Version data entries
18 entries across 18 versions & 2 rubygems