succession 0.1.0 → 0.2.0
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.
- data/README.md +2 -1
- data/config/routes.rb +3 -3
- data/lib/succession/url_helper.rb +2 -2
- data/lib/succession/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Succession
|
2
2
|
|
3
|
-
|
3
|
+
[](http://badge.fury.io/rb/succession)
|
4
4
|
|
5
|
+
Manage the Rails object succession easily.
|
5
6
|
|
6
7
|
You have to privide a user manage succession for a Rails object, you can simply
|
7
8
|
add this gem.
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
2
|
-
match '
|
3
|
-
match '
|
1
|
+
Succession::Engine.routes.draw do
|
2
|
+
match 'entities/:id/up/' => "entities#up"
|
3
|
+
match 'entities/:id/down/' => "entities#down"
|
4
4
|
end
|
@@ -37,11 +37,11 @@ module ActionView::Helpers::UrlHelper
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def succession_entity_up_path(entity)
|
40
|
-
"
|
40
|
+
"succession/entities/#{entity.id}/up"
|
41
41
|
end
|
42
42
|
|
43
43
|
def succession_entity_down_path(entity)
|
44
|
-
"
|
44
|
+
"succession/entities/#{entity.id}/down"
|
45
45
|
end
|
46
46
|
|
47
47
|
end
|
data/lib/succession/version.rb
CHANGED