search_scope 0.1.6 → 0.1.7

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/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('search_scope', '0.1.6') do |p|
5
+ Echoe.new('search_scope', '0.1.7') do |p|
6
6
  p.description = "Simplify searching a model by defining custom named_scopes."
7
7
  p.project = 'search-scope'
8
8
  p.url = "http://rubyforge.org/projects/search-scope"
data/lib/search_scope.rb CHANGED
@@ -9,7 +9,7 @@ module SearchScope
9
9
 
10
10
  def sort_search_by(name, options={})
11
11
  options[:label] ||= name.to_s.titleize
12
- options[:order] ||= name.to_s
12
+ options[:order] ||= "#{table_name}.#{name.to_s}"
13
13
  raise "you must supply a Symbol for a name to new_sortable_by (#{name.inspect})" unless name.is_a? Symbol
14
14
  return if sort_choices_hash.keys.include? name.to_s
15
15
  #the first sort added becomes the default sorting for all searches
data/search_scope.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{search_scope}
5
- s.version = "0.1.6"
5
+ s.version = "0.1.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ryan Owens"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_scope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Owens