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