Displaying 2 results from an estimated 2 matches for "will_paginate_without_i18n".
2009 Mar 21
2
ApplicationHelper::WillPaginate (NameError)
What wrong?
environment.rb
require "will_paginate"
application_helper.rb
include WillPaginate::ViewHelpers
def will_paginate_with_i18n(collection, options = {})
will_paginate_without_i18n(collection, options.merge(:previous_label =>
I18n.t(:previous), :next_label => I18n.t(:next)))
end
alias_method_chain :will_paginate, :i18n
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in
`load_missing_constant'': uninitialized constant
App...
2010 Jul 23
0
alias_method_chain with i18n
...I found
a possible solution at http://lawrencesong.net/2009/01/enable-i18n-in-will_paginate-plugin/
The author adds to application_helper.rb the following code:
#############################################
include WillPaginate::ViewHelpers
def will_paginate_with_i18n(collection, options = {})
will_paginate_without_i18n(collection, options.merge(:previous_label
=> I18n.t(''will_paginate.previous''), :next_label =>
I18n.t(''will_paginate.next'')))
end
alias_method_chain :will_paginate, :i18n
#############################################
What I would like to understand is how...