tramway-admin 1.21 → 1.21.1
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7a306e3b4dbdacac51abc14f24b44565af961a361feb8c94e42717f2fc286ed
|
|
4
|
+
data.tar.gz: 3d5d8d5aec53b2be67f9e1df584710e68c1d75994fa3c167795712af16600e3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 51ce1312cc9b939fd1ef4ee82394fda6f454a2ffed9039bd1216e0a8e7a0d2998629c01d47a93b383e1e6422f04663d59bc719bf4d6153958da322198d0d2015
|
|
7
|
+
data.tar.gz: 003c8cd220f6ff8fe380cc563e54ae4ca8ff8d310668cb5c7e99d459c8cd62b1b4d410fba2915cf5d0b034dbaa7b422a85c1adad27a496d02bc980aff3b0fb28
|
|
@@ -21,7 +21,7 @@ class Tramway::Admin::RecordsController < ::Tramway::Admin::ApplicationControlle
|
|
|
21
21
|
def create
|
|
22
22
|
@record_form = admin_form_class.new model_class.new
|
|
23
23
|
if @record_form.submit params[:record]
|
|
24
|
-
redirect_to params[:redirect]
|
|
24
|
+
redirect_to params[:redirect].present? ? params[:redirect] : record_path(@record_form.model)
|
|
25
25
|
else
|
|
26
26
|
render :new
|
|
27
27
|
end
|
|
@@ -34,7 +34,7 @@ class Tramway::Admin::RecordsController < ::Tramway::Admin::ApplicationControlle
|
|
|
34
34
|
def update
|
|
35
35
|
@record_form = admin_form_class.new model_class.active.find params[:id]
|
|
36
36
|
if @record_form.submit params[:record]
|
|
37
|
-
redirect_to params[:redirect]
|
|
37
|
+
redirect_to params[:redirect].present? ? params[:redirect] : record_path(@record_form.model)
|
|
38
38
|
else
|
|
39
39
|
render :edit
|
|
40
40
|
end
|
|
@@ -43,6 +43,6 @@ class Tramway::Admin::RecordsController < ::Tramway::Admin::ApplicationControlle
|
|
|
43
43
|
def destroy
|
|
44
44
|
record = model_class.active.find params[:id]
|
|
45
45
|
record.remove
|
|
46
|
-
redirect_to params[:redirect]
|
|
46
|
+
redirect_to params[:redirect].present? ? params[:redirect] : records_path
|
|
47
47
|
end
|
|
48
48
|
end
|