radiant-reorder_children-extension 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -26,7 +26,12 @@ or, add the gem to your environment.rb:
26
26
  Then update and migrate:
27
27
 
28
28
  rake db:migrate:extensions
29
- rake radiant:extensions:reorder:update
29
+ rake radiant:extensions:reorder_children:update
30
+
31
+ Remember that when working with Bundler, you will want to do something like (sample below assumes that you are using Radiant in production - change "production" to "development" or something else if you are using a different environment):
32
+
33
+ bundle exec rake db:migrate:extensions RAILS_ENV=production
34
+ bundle exec rake radiant:extensions:reorder_children:update RAILS_ENV=production
30
35
 
31
36
  ###Added Tags
32
37
 
@@ -1,3 +1,3 @@
1
1
  module RadiantReorderChildrenExtension
2
- VERSION = '1.0.6'
2
+ VERSION = '1.0.7'
3
3
  end
@@ -12,7 +12,7 @@ module ReorderChildren
12
12
  }
13
13
  tag "next" do |tag|
14
14
  by = tag.attr['by'] || "position"
15
- next_page = Page.find_by_parent_id(tag.locals.page.parent_id, :conditions => ["virtual = false and status_id = 100 and #{by} > ?", tag.locals.page.send(by)], :order => "#{by} ASC")
15
+ next_page = Page.find_by_parent_id(tag.locals.page.parent_id, :conditions => ["virtual = ? and status_id = 100 and #{by} > ?", false, tag.locals.page.send(by)], :order => "#{by} ASC")
16
16
  if next_page
17
17
  tag.locals.page = next_page
18
18
  tag.expand
@@ -28,7 +28,7 @@ module ReorderChildren
28
28
  }
29
29
  tag "previous" do |tag|
30
30
  by = tag.attr['by'] || "position"
31
- previous_page = Page.find_by_parent_id(tag.locals.page.parent_id, :conditions => ["virtual = false and status_id = 100 and #{by} < ?", tag.locals.page.send(by)], :order => "#{by} DESC")
31
+ previous_page = Page.find_by_parent_id(tag.locals.page.parent_id, :conditions => ["virtual = ? and status_id = 100 and #{by} < ?", false, tag.locals.page.send(by)], :order => "#{by} DESC")
32
32
  if previous_page
33
33
  tag.locals.page = previous_page
34
34
  tag.expand
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-reorder_children-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 0
9
- - 6
10
- version: 1.0.6
8
+ - 7
9
+ version: 1.0.7
11
10
  platform: ruby
12
11
  authors:
13
12
  - Benny Degezelle
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2012-03-05 00:00:00 +01:00
17
+ date: 2013-01-03 00:00:00 +01:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -65,27 +64,23 @@ rdoc_options: []
65
64
  require_paths:
66
65
  - lib
67
66
  required_ruby_version: !ruby/object:Gem::Requirement
68
- none: false
69
67
  requirements:
70
68
  - - ">="
71
69
  - !ruby/object:Gem::Version
72
- hash: 3
73
70
  segments:
74
71
  - 0
75
72
  version: "0"
76
73
  required_rubygems_version: !ruby/object:Gem::Requirement
77
- none: false
78
74
  requirements:
79
75
  - - ">="
80
76
  - !ruby/object:Gem::Version
81
- hash: 3
82
77
  segments:
83
78
  - 0
84
79
  version: "0"
85
80
  requirements: []
86
81
 
87
82
  rubyforge_project:
88
- rubygems_version: 1.4.2
83
+ rubygems_version: 1.3.6
89
84
  signing_key:
90
85
  specification_version: 3
91
86
  summary: Reorder Children for Radiant CMS