Sha256: 3144fc79b50a37a80a44f0fe2de250bee51f2be2af7d22605722f51a3b27b524

Contents?: true

Size: 539 Bytes

Versions: 23

Compression:

Stored size: 539 Bytes

Contents

module Riveter
  module QueryFilterFormHelper
    def query_filter_form_for(query_filter, options={}, &block)
      query_filter_class_name = query_filter.class.name.underscore
      options = {
        :as => query_filter_class_name.gsub(/_query_filter$/, ''),
        :url => query_filter_class_name.gsub(/_query_filter$/, ''),
        :method => :get
      }.merge(options)

      respond_to?(:simple_form_for) ?
        simple_form_for(query_filter, options, &block) :
        form_for(query_filter, options, &block)
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
riveter-0.8.3 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.8.2 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.8.1 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.8.0 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.7.0 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.6.0 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.3.0 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.2.1 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.2.0 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.1.1 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.15 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.14 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.13 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.12 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.11 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.10 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.9 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.8 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.7 app/helpers/riveter/query_filter_form_helper.rb
riveter-0.0.6 app/helpers/riveter/query_filter_form_helper.rb