Hello,
I was investigating solutions for i18n with will_paginate and 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 this code is working, the
"magic" behind it.
I''m also having a problem with this code with passenger. The code
works fine with webrick but with passenger the program breaks at
include WillPaginate::ViewHelpers with ''uninitialized constant
WillPaginate::ViewHelpers'' error. I tested it in the same environment.
Regards,
Paulo Abreu
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.