categoryz3 0.4 → 0.5

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.
@@ -6,7 +6,8 @@ module Categoryz3
6
6
  has_many :child_items , class_name: 'Categoryz3::ChildItem' , inverse_of: :category , dependent: :destroy
7
7
  validates :name , presence: true
8
8
 
9
- scope :parent_categories, -> { where(parent_id: nil) }
9
+ scope :root_categories, -> { where(parent_id: nil) }
10
+ scope :parent_categories, -> { root_categories }
10
11
  attr_accessible :name, :parent, :parent_id
11
12
 
12
13
  before_update :mark_as_dirty_if_parent_changed
@@ -35,6 +36,7 @@ module Categoryz3
35
36
 
36
37
  def mark_as_dirty_if_parent_changed
37
38
  @dirty_parent = parent_id_changed?
39
+ true
38
40
  end
39
41
 
40
42
  # Private: Reprocess all items in case the parent category
@@ -1,3 +1,3 @@
1
1
  module Categoryz3
2
- VERSION = "0.4"
2
+ VERSION = "0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: categoryz3
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: '0.5'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-01 00:00:00.000000000 Z
12
+ date: 2012-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  segments:
133
133
  - 0
134
- hash: 2265189143857855117
134
+ hash: 1788143576849423872
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  none: false
137
137
  requirements:
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  segments:
142
142
  - 0
143
- hash: 2265189143857855117
143
+ hash: 1788143576849423872
144
144
  requirements: []
145
145
  rubyforge_project:
146
146
  rubygems_version: 1.8.24