module Rankle::InstanceMethods
instance methods added to ActiveRecord
models
Public Instance Methods
position(name = :default)
click to toggle source
# File lib/rankle.rb, line 53 def position name = :default RankleIndex.position self, name end
position=(position)
click to toggle source
Assigns an explicit position to the record using the default ranker
@param format [Integer] the new position @return [Integer or Exception] the new position or an exception if the position could not be set
# File lib/rankle.rb, line 45 def position= position rank position end
rank(name = :default, position)
click to toggle source
# File lib/rankle.rb, line 49 def rank name = :default, position RankleIndex.rank self, name, position end
set_default_position()
click to toggle source
# File lib/rankle.rb, line 37 def set_default_position RankleIndex.set_default_position self end