lib/neat_pages/helpers.rb in neat-pages-1.0.1 vs lib/neat_pages/helpers.rb in neat-pages-1.0.2

- old
+ new

@@ -1,24 +1,26 @@ #************************************************************************************* # 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) +module NeatPages + module 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 + ("<#{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 + # 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 + def neat_pages_status + NeatPages::Helpers::Status.new(pagination, request).generate + end - ::ActionView::Base.send :include, self + ::ActionView::Base.send :include, self + end end require 'neat_pages/helpers/builder' require 'neat_pages/helpers/navigation' require 'neat_pages/helpers/status'