Sha256: 464666504f85e64d5092c15e77f4e81c4f6572f46c9f6670a1a1aafcb0962469

Contents?: true

Size: 1.15 KB

Versions: 27

Compression:

Stored size: 1.15 KB

Contents

All view related aspects of filterrific are handled via the view API:

<%= filterrific_form_for @filterrific do |f| %>

  <%= f.select :author, # look at formtastic for inspiration. It auto generates a bunch of stuff %>
  Options for select:
  * multiple => false
  * allow_blank => true or "-- Any --"
  * value_method => :id
  * label_method => %w[name title label]
  * collection => 

  <%= f.boolean :published %>
  Renders a checkbox

  <%= f.search %>
  Renders a text box for searching
  Options:
  * JS: event: keydown, delay, min_chars
  * wildcards here or in model?

  <%= f.date or f.datetime %>
  Renders a text box for date selection. Integrate with jQuery UI calendar select
  * date is date only
  * datetime also adds time

  <%= f.radio %>
  Renders a radio button to select one of many options
  Options
  * label_methods => see select
  * value_method => :id
  * collection => 

  <%= f.sort %>
  Renders a select for choosing sort options
  Options
  * collection => 

<% end %>


<%= filterrific_info(options) %>

Options:
* :print_all_available_filters
* :print_current_filter_params


Also have to add JS to observe the form. Use generator for that?

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
filterrific-5.2.1 doc/development_notes/view_api.txt
filterrific-5.2.0 doc/development_notes/view_api.txt
filterrific-5.1.0 doc/development_notes/view_api.txt
filterrific-4.0.1 doc/development_notes/view_api.txt
filterrific-5.0.1 doc/development_notes/view_api.txt
filterrific-5.0.0 doc/development_notes/view_api.txt
filterrific-3.0.0 doc/development_notes/view_api.txt
filterrific-4.0.0 doc/development_notes/view_api.txt
filterrific-2.1.2 doc/development_notes/view_api.txt
filterrific-2.1.1 doc/development_notes/view_api.txt
filterrific-2.1.0 doc/development_notes/view_api.txt
filterrific-2.0.5 doc/development_notes/view_api.txt
filterrific-2.0.4 doc/development_notes/view_api.txt
filterrific-2.0.3 doc/development_notes/view_api.txt
filterrific-2.0.2 doc/development_notes/view_api.txt
filterrific-2.0.1 doc/development_notes/view_api.txt
filterrific-2.0.0 doc/development_notes/view_api.txt
filterrific-1.4.3 doc/development_notes/view_api.txt
filterrific-1.4.2 doc/development_notes/view_api.txt
filterrific-1.4.1 doc/development_notes/view_api.txt