Sha256: 505bbd1319af4cb3521af1cc9b158e8ea55ee791b81411d93b958715e4730560

Contents?: true

Size: 840 Bytes

Versions: 5

Compression:

Stored size: 840 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_time
  #   attr_boolean
  #   attr_enum
  #   attr_array
  #   attr_hash
  #   attr_model
  #

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

end
<% end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
riveter-0.0.6 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.5 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.4 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.3 lib/generators/riveter/query_filter/templates/query_filter.rb
riveter-0.0.1 lib/generators/riveter/query_filter/templates/query_filter.rb