search for: search_form_for

Displaying 3 results from an estimated 3 matches for "search_form_for".

2011 Nov 20
3
Use Ransack with radio buttons for boolean values
...arch for active and non active users. These radio buttons work just fine except that it didn''t reselect itself after the form has been submitted. So, what should I do to ensure it will be selected just like how my text field populated automatically after the form has been submitted? = search_form_for @q do |f| = f.radio_button :is_active_false, 1 = f.radio_button :is_active_true, 1 Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/r...
2012 Feb 21
10
Search of multiple columns
I am currently writing a search method for my rails applications and at the moment it works fine. I have the following in my game.rb: def self.search(search) if search find(:all, :conditions => [''game_name LIKE ? OR genre LIKE ? OR console LIKE ?'', "%#{search}%", "#{search}", "#{search}"]) else find(:all) end end No that searches
2013 May 27
3
Ransack, acts-as-taggable-on and checkboxes in search form
...n tags which are selected by user. So that only projects which have all of the selected tags were displayed. Also a have categories, projects belong to categories. So the checkboxes for categories work as expected. But how can i do checkboxes for tags? Here''s my form for search: = search_form_for @search do |f| - @categories.each do |category| = check_box_tag(''q[category_id_eq_any][]'', category.id) = category.name = f.text_field :budjet_gteq = f.text_field :budjet_lteq - @tags.each do |tag| = check_box_tag(''q[tags_...