hackathon_manager 0.11.1 → 0.11.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fb8ba46c7be1367d9b0e0930a225d74b1d0f8dd70cbb3ea05ac3a2328e5aeb1
|
4
|
+
data.tar.gz: 7b3a5ab676f8324535a66b6adddb1fcb5cecff9b611036d281353522a1c14777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8f0707e22cf530077a49d854106f8a70e90c30d05e4c128b84c82d00ed97f174c37ea5e7dc6c256365bb0a54ba39114edc462d61ae08af12e7e19798323f7ce
|
7
|
+
data.tar.gz: 58438d3dd05085940d2f337fd8d54981c93bfd7b5c2ee1315b7c99b2f7b036b28bf292ac6d2c111b3e8f3b21f7605f03a3a6cab80d51d0b54f967132dbb2177f
|
@@ -15,4 +15,11 @@ class Manage::ApplicationController < ApplicationController
|
|
15
15
|
def json_request?
|
16
16
|
request.format.json?
|
17
17
|
end
|
18
|
+
|
19
|
+
def response_view_or_errors(view, model)
|
20
|
+
respond_to do |format|
|
21
|
+
format.html { render(view) }
|
22
|
+
format.json { render json: { errors: model.errors.full_messages } }
|
23
|
+
end
|
24
|
+
end
|
18
25
|
end
|
@@ -41,7 +41,7 @@ class Manage::TrackableEventsController < Manage::ApplicationController
|
|
41
41
|
format.json { render json: @trackable_event }
|
42
42
|
end
|
43
43
|
else
|
44
|
-
|
44
|
+
response_view_or_errors :new, @trackable_event
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -53,7 +53,7 @@ class Manage::TrackableEventsController < Manage::ApplicationController
|
|
53
53
|
format.json { render json: @trackable_event }
|
54
54
|
end
|
55
55
|
else
|
56
|
-
|
56
|
+
response_view_or_errors :edit, @trackable_event
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
@@ -32,7 +32,7 @@ class Manage::TrackableTagsController < Manage::ApplicationController
|
|
32
32
|
flash[:notice] = 'Trackable tag was successfully created.'
|
33
33
|
respond_with(:manage, @trackable_tag)
|
34
34
|
else
|
35
|
-
|
35
|
+
response_view_or_errors :new, @trackable_tag
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
@@ -42,7 +42,7 @@ class Manage::TrackableTagsController < Manage::ApplicationController
|
|
42
42
|
flash[:notice] = 'Trackable tag was successfully updated.'
|
43
43
|
respond_with(:manage, @trackable_tag)
|
44
44
|
else
|
45
|
-
|
45
|
+
response_view_or_errors :edit, @trackable_tag
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hackathon_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Olivera
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|