lib/ordered_list/active_record/list.rb
# Returns the (first) position in the current scope.
Returns the (first) position in the current scope.
Returns the ( first ) position in the current scope .
def retrieve_position
        scope = select(table[klass.position_column]).limit(1)
        result = connection.select_all(scope.arel, "SQL", scope.bind_values).first
        Position.new(type_cast_attribute(result.keys.first, result)) if result
      end
def retrieve_position scope = select ( table [ klass . position_column ] ) . limit ( 1 ) result = connection . select_all ( scope . arel , "SQL" , scope . bind_values ) . first Position . new ( type_cast_attribute ( result . keys . first , result ) ) if result end
Returns the (first) position in the current scope.
Returns the ( first ) position in the current scope .