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

Version Path
brainsome_typus-4.0.0.beta13 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta12 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta11 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta10 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta9 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta8 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta7 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta6 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta5 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta4 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta3 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta2 app/helpers/admin/resources/data_types/integer_helper.rb
brainsome_typus-4.0.0.beta1 app/helpers/admin/resources/data_types/integer_helper.rb
typus-3.1.10 app/helpers/admin/resources/data_types/integer_helper.rb
typus-3.1.9 app/helpers/admin/resources/data_types/integer_helper.rb
typus-3.1.8 app/helpers/admin/resources/data_types/integer_helper.rb
typus-3.1.7 app/helpers/admin/resources/data_types/integer_helper.rb
typus-3.1.6 app/helpers/admin/resources/data_types/integer_helper.rb