Module: Espresso::Helpers

Includes:
WillPaginate::ViewHelpers
Defined in:
lib/espresso/helpers.rb

Instance Method Summary collapse

Instance Method Details

#simple_searchObject



5
6
7
8
9
10
11
12
13
# File 'lib/espresso/helpers.rb', line 5

def simple_search
  form_tag(url_for(:action => :index), :method => :get, :class => 'b_search b_search-simple') do
    inform = returning '' do |result|
      result << text_field_tag(:q, params[:q])
      result << submit_tag(t('krasivotokak.espresso.find', :default => 'Find!'), :class => 'submit')
    end
    concat inform
  end
end

#will_paginate_with_i18n(collection, options = {}) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/espresso/helpers.rb', line 15

def will_paginate_with_i18n(collection, options = {})
  will_paginate_without_i18n(collection,
                             options.merge({
    :class => 'b_pagination',
    :previous_label => t('krasivotokak.espresso.previous', :default => '← Previous'),
    :next_label =>     t('krasivotokak.espresso.next', :default => 'Next →')}))
end