generic_resources 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,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5bcc3c3df82c181e50fd18d8d600770f7d1b4e83
|
|
4
|
+
data.tar.gz: f35a720bf96d4b72460218a6ec84093da9fd1fe3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 85d1c1b705a49c06bd121d500a5475e5d0929bd78a7ca36409191ea0080d27f13b11ec6d697f06cc6063c6a26c115364b550f931bf20dd3bf178ae80e6c64f0c
|
|
7
|
+
data.tar.gz: 9cb7cb09470a631d3afe56c4fd0aeb125e0827e559cc4285a3c11a8531545586b216f10583a8399606dc4710c090ecd6a80dee578b85239b337d33a6dc58efce
|
|
@@ -7,7 +7,7 @@ class GenericResources::ResourcesController < GenericResources.configuration.par
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def index
|
|
10
|
-
|
|
10
|
+
session["#{@resource_class.to_s.underscore}_page"] = params[:page].present? ? params[:page].to_i : 1
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def new
|
|
@@ -28,7 +28,7 @@ class GenericResources::ResourcesController < GenericResources.configuration.par
|
|
|
28
28
|
resource_name: @resource_class.model_name.human, errors: @resource.errors.messages)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
redirect_to_index
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def update
|
|
@@ -39,7 +39,7 @@ class GenericResources::ResourcesController < GenericResources.configuration.par
|
|
|
39
39
|
resource_name: @resource_class.model_name.human, errors: @resource.errors.messages)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
redirect_to_index
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def destroy
|
|
@@ -70,4 +70,9 @@ class GenericResources::ResourcesController < GenericResources.configuration.par
|
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
def redirect_to_index
|
|
74
|
+
page = session["#{@resource_class.to_s.underscore}_page"]
|
|
75
|
+
redirect_to generic_resources.url_for(action: 'index', resource_name: params[:resource_name], page: page)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: generic_resources
|
|
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
|
- Florian Eck
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -96,9 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
96
96
|
version: '0'
|
|
97
97
|
requirements: []
|
|
98
98
|
rubyforge_project:
|
|
99
|
-
rubygems_version: 2.
|
|
99
|
+
rubygems_version: 2.6.12
|
|
100
100
|
signing_key:
|
|
101
101
|
specification_version: 4
|
|
102
102
|
summary: Easy CRUD Interface for Rails
|
|
103
103
|
test_files: []
|
|
104
|
-
has_rdoc:
|