(Not documented)
# File vendor/plugins/ubiquo_core/lib/ubiquo/filters/boolean_filter.rb, line 5
5: def configure(field, options = {})
6: defaults = {
7: :field => "filter_#{field}",
8: :caption => @model.human_attribute_name(field),
9: :caption_true => I18n.t('ubiquo.filters.boolean_true'),
10: :caption_false => I18n.t('ubiquo.filters.boolean_false'),
11: }
12: @options = defaults.merge(options)
13: collection = [
14: OpenStruct.new(:option_id => 0, :name => @options[:caption_false]),
15: OpenStruct.new(:option_id => 1, :name => @options[:caption_true]),
16: ]
17: boolean_options = {
18: :id_field => :option_id,
19: :name_field => :name,
20: :collection => collection
21: }
22: @options.update(boolean_options)
23: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.