Sha256: e1c0f7dc9e630e2c9d33ca8349026e4e30333e9a981c27e5ef830ee0278767a5

Contents?: true

Size: 863 Bytes

Versions: 12

Compression:

Stored size: 863 Bytes

Contents

<% module_namespacing do -%>
class <%= class_name %>QueryFilter < Riveter::QueryFilter::Base
<% if filter_attributes.any? %>
<% filter_attributes.each do |attribute| -%>
  attr_<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %>
<% end -%>
<% else -%>

  #
  # define filter attributes
  #
  # E.g.
  #
  #   attr_string :name[, options]
  #
  #   options include:
  #    :required => true|false  # default is false
  #    :default => 'a value'    # default is nil
  #    :validate => true|false  # default is true
  #
  #  supported attributes:
  #
  #   attr_string
  #   attr_text
  #   attr_integer
  #   attr_decimal
  #   attr_date
  #   attr_date_range
  #   attr_time
  #   attr_boolean
  #   attr_enum
  #   attr_array
  #   attr_hash
  #   attr_model
  #

  # optionally, define additional validations
<% end -%>

end
<% end -%>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
riveter-0.2.1 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.2.0 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.1.1 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.15 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.14 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.13 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.12 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.11 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.10 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.9 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.8 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.7 lib/generators/riveter/query_filter/templates/query_filter.rb