Module: Card::Set::Abstract::Search::Views::Format
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb
Instance Method Summary collapse
-
#item_cards ⇒ Object
-
#term_param ⇒ Object
-
#view: card_list ⇒ Object
-
#view: no_search_results ⇒ Object
-
#view: search_count ⇒ Object
-
#view: search_error ⇒ Object
-
#with_results ⇒ Object
Instance Method Details
#item_cards ⇒ Object
35 36 37 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb', line 35 def item_cards search_with_params end |
#term_param ⇒ Object
39 40 41 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb', line 39 def term_param params[:term] end |
#view: card_list ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb', line 17 view :card_list, cache: :never do if search_with_params.empty? "no results" else search_with_params.map do |item_card| nest_item item_card end.join "\n" end end |
#view: no_search_results ⇒ Object
27 28 29 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb', line 27 view :no_search_results do "no results" end |
#view: search_count ⇒ Object
9 10 11 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb', line 9 view :search_count, cache: :never do search_with_params.to_s end |
#view: search_error ⇒ Object
13 14 15 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb', line 13 view :search_error, cache: :never do %(#{search_with_params.class} :: #{search_with_params.} :: #{card.content}) end |
#with_results ⇒ Object
31 32 33 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb', line 31 def with_results search_with_params.empty? ? render_no_search_results : yield end |