fake_arel 1.3.1 → 1.3.2

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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.3.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fake_arel}
8
- s.version = "1.3.1"
8
+ s.version = "1.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Grant Ammons"]
@@ -7,6 +7,7 @@ module WithScopeReplacement
7
7
  join_dependency = JoinDependency.new(self, merge_includes(scope(:find, :include), nil), nil)
8
8
  scope = scope(:find)
9
9
  sql = "SELECT #{(scope && scope[:select]) || default_select(options[:joins] || (scope && scope[:joins]))} "
10
+ sql << "FROM #{(scope && scope[:from]) || quoted_table_name} "
10
11
  sql << join_dependency.join_associations.collect{|join| join.association_join }.join
11
12
 
12
13
  add_joins!(sql, options[:joins], scope)
@@ -59,8 +59,8 @@ describe "Fake Arel" do
59
59
 
60
60
  it "should only include the selects we select" do
61
61
  sql = Topic.select("topics.id").includes(:replies).where("replies.id = 1").to_sql
62
+ sql.should =~ /FROM "topics"/
62
63
  sql.should =~ /SELECT topics.id/
63
-
64
64
  end
65
65
  end
66
66
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_arel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 1
10
- version: 1.3.1
9
+ - 2
10
+ version: 1.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Grant Ammons