Sha256: de28eabf717b527884b74786c930aa1bb5b57542ce063632e00e969d836d92c1
Contents?: true
Size: 637 Bytes
Versions: 3
Compression:
Stored size: 637 Bytes
Contents
class SomaticLinkRenderer < WillPaginate::ViewHelpers::LinkRenderer def prepare(collection, options, template) super @collection_name = template.controller.controller_name @param_name = "#{@collection_name}_page" @options[:previous_label] = I18n.t(:previous) @options[:next_label] = I18n.t(:next) end private def link(text, target, attributes = {}) if target.is_a? Fixnum attributes[:rel] = rel_value(target) target = url(target) end attributes[:href] = target # tag(:a, text, attributes) @template.link_to(text,target, attributes.merge({:remote => true})) end end
Version data entries
3 entries across 3 versions & 2 rubygems