sort_it_out 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Histroy.txt CHANGED
@@ -1,4 +1,4 @@
1
- = 0.9.0 2009-11-15
1
+ = 0.9.1 2009-11-15
2
2
 
3
3
  * Ported from a lib in a project to this Gem.
4
4
  * No tests yet.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.1
data/lib/sort_it_out.rb CHANGED
@@ -4,7 +4,7 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'sort_it_out/sortable.rb'
5
5
 
6
6
  module SortItOut
7
- VERSION = '0.9.0'
7
+ VERSION = '0.9.1'
8
8
  end
9
9
 
10
10
  ActionController::Base.send( :include, SortItOut::Sortable ) if defined?( ActionController::Base )
@@ -28,7 +28,7 @@ module SortItOut
28
28
  protected
29
29
 
30
30
  def resolve_order_clause( order, dir="ASC" )
31
- translated = self.options[:map][order.to_sym]
31
+ translated = self.options[:map][order.to_sym] unless self.options[:map].nil?
32
32
  order = translated unless translated.nil?
33
33
  return order.is_a?( Array ) ? order.map { |field| "#{field} #{dir}" }.join( ", " ) : "#{order} #{dir}"
34
34
  end
data/sort_it_out.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sort_it_out}
8
- s.version = "0.9.0"
8
+ s.version = "0.9.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jason Harrelson"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sort_it_out
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Harrelson