typus 3.1.0.rc5 → 3.1.0.rc6

Sign up to get free protection for your applications and to get access to all the features.
@@ -153,7 +153,7 @@ class Admin::ResourcesController < Admin::BaseController
153
153
  @resource = @resource.where(condition)
154
154
  end
155
155
 
156
- @resource.build_joins(params).each do |join|
156
+ @resource.build_my_joins(params).each do |join|
157
157
  @resource = @resource.joins(join)
158
158
  end
159
159
 
@@ -91,7 +91,7 @@ module Typus
91
91
  end
92
92
  end
93
93
 
94
- def build_joins(params)
94
+ def build_my_joins(params)
95
95
  query_params = params.dup
96
96
  query_params.reject! { |k, v| !model_relationships.keys.include?(k.to_sym) }
97
97
  query_params.compact.map { |k, v| k.to_sym }
@@ -1,3 +1,3 @@
1
1
  module Typus
2
- VERSION = "3.1.0.rc5"
2
+ VERSION = "3.1.0.rc6"
3
3
  end
@@ -297,7 +297,7 @@ class ActiveRecordTest < ActiveSupport::TestCase
297
297
 
298
298
  end
299
299
 
300
- context "build_joins" do
300
+ context "build_my_joins" do
301
301
 
302
302
  setup do
303
303
  @project = Factory(:project)
@@ -306,7 +306,7 @@ class ActiveRecordTest < ActiveSupport::TestCase
306
306
 
307
307
  should "return the expected joins" do
308
308
  params = { :projects => @project.id }
309
- assert_equal [:projects], User.build_joins(params)
309
+ assert_equal [:projects], User.build_my_joins(params)
310
310
  end
311
311
 
312
312
  ##
@@ -318,7 +318,7 @@ class ActiveRecordTest < ActiveSupport::TestCase
318
318
 
319
319
  @resource = User
320
320
  @resource.build_conditions(params).each { |c| @resource = @resource.where(c) }
321
- @resource.build_joins(params).each { |j| @resource = @resource.joins(j) }
321
+ @resource.build_my_joins(params).each { |j| @resource = @resource.joins(j) }
322
322
 
323
323
  assert_equal [@project.user.id], @resource.map(&:id)
324
324
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: typus
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 3.1.0.rc5
5
+ version: 3.1.0.rc6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Francesc Esplugas