active_scaffold_sortable 3.2.12 → 3.2.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e864193528c8155624de24f0f7dde67410ba0d8
4
- data.tar.gz: d8fe87a567fc065fef9e62011bc7b2069de4c372
3
+ metadata.gz: bd9c9467a359a3f696bb77c77620edcd43e79a71
4
+ data.tar.gz: eeb731b0be39818643fe49b8a770a9815d258ef2
5
5
  SHA512:
6
- metadata.gz: ae255ffa2331ea264259a56e811a37c25079ce4acde317ec74bf99cff7a77bec83cdfa8e8eca09573b1342f909dfb94652aaa171ea9cf23b9b3db7d0771b2bca
7
- data.tar.gz: d9d6316aa7fd6b20e85f9adbaf85f6e08e938ad1c81ccfaa33f4e22d6e54f81227d6972e52ace01b3c2bab8096c13660cc9e106c2a47ac235dd214680cd2c50f
6
+ metadata.gz: d8e8f17c2497b2411298c259e4f018f3b85b6a7095994a90b8360eceefe0b943ef3bbb2f13dc69e906009c544e2836ddf127c50d35fa9f7c90024311216fdd73
7
+ data.tar.gz: 343a79b6ebe39e2bef4eb8ea39d4313bffb434597d13cd815b492415c7a9d94784789e08edf07beae607cc93a8a82af610bfb33c432b93abdfe24864bac22b18
@@ -1,5 +1,5 @@
1
1
  .sortable-handle { cursor: move; }
2
- .active-scaffold .sub-form table td.sortable-handle { display: table-cell; }
2
+ .active-scaffold .sub-form table td.sortable-handle { display: table-cell; visibility: visible; }
3
3
  .active-scaffold .sub-form tbody.sortable-highlight { display: table-row; }
4
4
  td.sortable-handle, .active-scaffold .sub-form table td.sortable-handle {
5
5
  background: image-url('active_scaffold/sortable.png') no-repeat center center;
@@ -6,7 +6,7 @@ module ActiveScaffoldSortable
6
6
 
7
7
  def update_column_from_params_with_sortable(parent_record, column, attribute, avoid_changes = false)
8
8
  update_column_from_params_without_sortable(parent_record, column, attribute, avoid_changes).tap do |value|
9
- if column.plural_association?
9
+ if column.association.try(:collection?)
10
10
  config = active_scaffold_config_for(column.association.klass)
11
11
  if config.actions.include?(:sortable)
12
12
  parent_record.association(column.association.name).target = value.sort_by(&config.sortable.column.name)
@@ -15,4 +15,4 @@ module ActiveScaffoldSortable
15
15
  end
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -2,7 +2,7 @@ module ActiveScaffoldSortable
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 2
5
- PATCH = 12
5
+ PATCH = 13
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
data/test/test_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  ENV["RAILS_ENV"] = "test"
3
3
 
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
  # You can use "rake test AR_VERSION=2.0.5" to test against 2.0.5, for example.
6
6
  # The default is to use the latest installed ActiveRecord.
7
7
  if ENV["AR_VERSION"]
@@ -15,24 +15,16 @@ require 'action_controller'
15
15
  require 'action_view/test_case'
16
16
  require 'action_mailer'
17
17
  require 'active_support'
18
- require 'initializer'
19
- ActionController::Base::logger = ActiveSupport::BufferedLogger.new(Tempfile.new('log').path)
18
+ require 'rails'
19
+ require 'active_scaffold'
20
+ require 'active_scaffold_sortable'
20
21
 
21
- RAILS_ROOT = File.join(File.dirname(__FILE__), '../../../..')
22
- Rails.configuration = Rails::Configuration.new
22
+ require 'mocha/setup'
23
23
 
24
- require 'shoulda'
25
- require 'shoulda/rails'
26
- require 'mocha'
27
- begin
28
- require 'redgreen'
29
- rescue LoadError
30
- end
31
-
32
- ActiveSupport::Dependencies.load_paths = %w(test/models test/controllers lib ../active_scaffold/lib).map {|dir| File.dirname(__FILE__) + "/../#{dir}"}
33
- $:.unshift *ActiveSupport::Dependencies.load_paths
24
+ #ActiveSupport::Dependencies.load_paths = %w(test/models test/controllers lib ../active_scaffold/lib).map {|dir| File.dirname(__FILE__) + "/../#{dir}"}
25
+ #$:.unshift *ActiveSupport::Dependencies.load_paths
34
26
 
35
- require File.join(File.dirname(__FILE__), '../../active_scaffold/environment')
27
+ require File.join(File.dirname(__FILE__), '../../active_scaffold/lib/active_scaffold')
36
28
  require 'sortable'
37
29
 
38
30
  ActionController::Routing::Routes.draw do |map|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_sortable
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.12
4
+ version: 3.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Cambra
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-30 00:00:00.000000000 Z
12
+ date: 2017-03-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: active_scaffold
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 3.3.0.rc3
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 3.3.0.rc3
28
28
  description: Sort Tree or List Structures by Drag n Drop
@@ -82,17 +82,17 @@ require_paths:
82
82
  - lib
83
83
  required_ruby_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - '>='
90
+ - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.4.5
95
+ rubygems_version: 2.6.10
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Drag n Drop Sorting for Activescaffold