Sha256: 48a269efd69783cdb0f801ebc8b7dff3e39e2dc07a04c6b09dddd934a9a24fb8
Contents?: true
Size: 1022 Bytes
Versions: 2
Compression:
Stored size: 1022 Bytes
Contents
#************************************************************************************* # Insert a bunch of helper methods in the ActionView::Base of a Rails project. #************************************************************************************* module NeatPages::Helpers def neat_pages_ajax_items(partial_path, options={}) options = { wrapper: :div }.merge(options) ("<#{options[:wrapper]} id=\"neat-pages-ajax-wrapper\" class=\"first-load\">" + render(partial_path, options) + "</#{options[:wrapper]}>").html_safe end # DEPRECATED : The options parameter is deprecated. I left it here for backward compatibility. (2013-11-20) def neat_pages_navigation(options={}) NeatPages::Helpers::Navigation.new(pagination, request).generate end def neat_pages_status NeatPages::Helpers::Status.new(pagination, request).generate end ::ActionView::Base.send :include, self end require 'neat_pages/helpers/builder' require 'neat_pages/helpers/navigation' require 'neat_pages/helpers/status'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
neat-pages-1.0.1 | lib/neat_pages/helpers.rb |
neat-pages-1.0.0 | lib/neat_pages/helpers.rb |