th_simple_content_management 0.1.1 → 0.1.2
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,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NzAxOTJkNjExMzMwNDg4YTVmNjI1YzdmMDM2MThkNjE5NzQxNmMxNA==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NjBiNmM1MzMyNTRkYjQwNmNkZDg4OGFhNzBkNDRkMTYxNTQ0NTg5MQ==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MzMzZDYyNGE5NzAyNjVmZjA3MjkyNGMzMjcyN2NkNzYxMGVhMjRjMGVjODQ1
|
|
10
|
+
OWYzNTg2ZGZmYmM4ODQxOGQzMjk1YWIxMjI4NDkyNGJhZTM4ZjBiNWY2MDJh
|
|
11
|
+
ZjA1NDExNjNiYjM0ZTZjNGUxNWEwMDg2YWQxOTc2OTFhM2M0Yzk=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZjQyN2IyY2YwYjE2MGY5OGU3YzZlM2FjMTkzNWZiYTM2MDYxZGUzZDNlMDBj
|
|
14
|
+
M2YwOWE3YTkwNmIyMGM5NDBlZDQ3OTYwYWRmYzBkNjE4MmIzZTJlZGVjNDJj
|
|
15
|
+
MmEwNGFhZWViOTQ1NDQ4ZDZiYmVhZWM0MGRlZmM2Yjc0OWRlYjQ=
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
class SimpleContentManagement::SimplePage < ActiveRecord::Base
|
|
2
|
-
has_many :simple_routes, conditions: {
|
|
2
|
+
has_many :simple_routes, conditions: { deleted: false }, class_name: "SimpleContentManagement::SimpleRoute"
|
|
3
3
|
|
|
4
4
|
attr_accessible :name, :title, :content_html, :simple_routes_list
|
|
5
5
|
|
|
6
|
-
scope :active, where(
|
|
6
|
+
scope :active, where(deleted: false)
|
|
7
7
|
|
|
8
8
|
def simple_routes_list
|
|
9
9
|
path_names.join ","
|
|
@@ -20,7 +20,7 @@ class SimpleContentManagement::SimplePage < ActiveRecord::Base
|
|
|
20
20
|
# ensure any existing routes are set active to the current page.
|
|
21
21
|
SimpleContentManagement::SimpleRoute.where(path: path_names).each do |simple_route|
|
|
22
22
|
simple_route.simple_page = self
|
|
23
|
-
simple_route.
|
|
23
|
+
simple_route.deleted = false
|
|
24
24
|
simple_route.save
|
|
25
25
|
path_names.delete simple_route.path
|
|
26
26
|
end
|
|
@@ -40,6 +40,6 @@ class SimpleContentManagement::SimplePage < ActiveRecord::Base
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def destroy
|
|
43
|
-
update_attribute :
|
|
43
|
+
update_attribute :deleted, true
|
|
44
44
|
end
|
|
45
45
|
end
|
|
@@ -7,10 +7,10 @@ class SimpleContentManagement::SimpleRoute < ActiveRecord::Base
|
|
|
7
7
|
|
|
8
8
|
after_save :inform_simple_pages_constraint
|
|
9
9
|
|
|
10
|
-
scope :active, where(
|
|
10
|
+
scope :active, where(deleted: false)
|
|
11
11
|
|
|
12
12
|
def destroy
|
|
13
|
-
update_attribute :
|
|
13
|
+
update_attribute :deleted, true
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
private
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: th_simple_content_management
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Toby Hinloopen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-05-
|
|
11
|
+
date: 2013-05-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|