Sha256: ce2809d8d1cb54109416752ac9f50d06f12414532f0ea2adf463421b0ae017dd

Contents?: true

Size: 425 Bytes

Versions: 36

Compression:

Stored size: 425 Bytes

Contents

class <%= class_name.pluralize %>Filter < Refine::Filter
  include Refine::Conditions
  @@default_stabilizer = Refine::Stabilizers::UrlEncodedStabilizer

  def initial_query
    <%= class_name %>.all
  end

  def table
    <%= class_name %>.arel_table
  end

  def conditions
    [
<% @conditions.each do |condition| -%>
      <%= condition[:condition] %>Condition.new("<%= condition[:field] %>"),
<% end -%>
    ]
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
refine-rails-2.10.0 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.14 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.13 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.12 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.11 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.10 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.9 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.8 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.7 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.6 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.5 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.4 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.3 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.2 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.1 lib/generators/filter/templates/filter.rb.erb
refine-rails-2.9.0 lib/generators/filter/templates/filter.rb.erb