trusty-reorder-extension 2.0.0.pre.beta → 2.0.1.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/db/migrate/01_add_position_to_pages.rb +2 -2
- data/trusty-reorder-extension.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmM4MDAxMmE0MmViODBhNjQ0YTFkYWU2NzEyZDY0Yjg5YWMyNzA0ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjVmNzAxZWFkNGJmZGYwOTdkODEzYmI5Zjk1NDkyZWMxOGIyOTNmMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWYxZGIyZjE3OGFlOTVhM2ZhYTdmMzZlYmI4ZWU1NGQzYjFmMGJmMmRlZDcy
|
10
|
+
MjhiYjU1NGZiMGEwNWM1YTlhNjY4NmZiYjMzYjIxMTI0NTI2YWI5OWE5MGYx
|
11
|
+
OTQ2MWQ2ZGI4NzQ4NzQ1MzdmYzlkMTBmOGI2OWE3MmM4OTBjNjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmRiMTRiOGE0ZTI3YTQxZTE3Y2FiNDFjODE4ZWY1NjdjMGFmMTc0NjMwYTI5
|
14
|
+
Y2QyYzJkYjk2Yjc2MjY3OTIzMzZiMjI3ZTJiNGYxMDZkNzc2ZDMzZDY4NDNk
|
15
|
+
YTg3Mzk0NDA4ZGI2OTVmODExNzc2M2EwYjAxOTg2Y2YwZGMxODQ=
|
@@ -4,7 +4,7 @@ class AddPositionToPages < ActiveRecord::Migration
|
|
4
4
|
Page.reset_column_information
|
5
5
|
say_with_time("Putting all pages in a default order...") do
|
6
6
|
ActiveRecord::Base.record_timestamps = false
|
7
|
-
Page.
|
7
|
+
Page.where(parent_id: nil).each do |p|
|
8
8
|
put_children_into_list(p)
|
9
9
|
end
|
10
10
|
ActiveRecord::Base.record_timestamps = true
|
@@ -16,7 +16,7 @@ class AddPositionToPages < ActiveRecord::Migration
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.put_children_into_list(page)
|
19
|
-
page.children.
|
19
|
+
page.children.order("title asc").each_with_index do |pg, idx|
|
20
20
|
pg.update_attribute('position', idx + 1)
|
21
21
|
put_children_into_list(pg)
|
22
22
|
end
|
@@ -4,7 +4,7 @@ require "trusty-reorder-extension"
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "trusty-reorder-extension"
|
7
|
-
s.version = "2.0.
|
7
|
+
s.version = "2.0.1-beta"
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.authors = ["Sean Cribbs", "Eric Sipple", "Danielle Greaves"]
|
10
10
|
s.description = %q{Extends Trusty CMS to allow page ordering}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trusty-reorder-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1.pre.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Cribbs
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-07-
|
13
|
+
date: 2015-07-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: acts_as_list
|