lib/neat_pages/base.rb in neat-pages-0.0.2 vs lib/neat_pages/base.rb in neat-pages-0.1.0
- old
+ new
@@ -9,11 +9,11 @@
#*************************************************************************************
# CONSTRUCTOR
#*************************************************************************************
def initialize(current_page, options={})
- options = { :per_page => 10, :total_items => 0 }.merge(options)
+ options = { per_page: 10, total_items: 0 }.merge(options)
@per_page = options[:per_page].to_i
@total_items = options[:total_items]
@current_page = init_current_page(current_page)
@@ -23,26 +23,12 @@
#*************************************************************************************
# PUBLIC INSTANCE METHODS
#*************************************************************************************
- def activate_helpers(base_url='', params={})
- @helpers = NeatPages::Helpers.new(self, base_url, params)
- end
-
def empty?
@total_items == 0
end
-
- def helpers
- if @helpers
- @helpers
- else
- raise 'You must activate the helpers by calling "activate_helpers".'
- end
- end
-
- alias_method :h, :helpers
def limit
@per_page
end