ish_manager 0.1.8.246 → 0.1.8.247

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: bfffb0ee4f6d94e5697f21cd1583d16831aa4e075a6cb2894952cb6b80d5fddb
4
- data.tar.gz: 7f827deee207a28c7941436f5b2bb726c5579e45c0eb4fee31c22b1fb267a721
3
+ metadata.gz: d2b1f18c818065b7a7bf279360aac3a21655ebce24d54c94c0ed7dd9818b449a
4
+ data.tar.gz: cbc270996bdb1af5c86fadcd913d7698f4a3174b115ac49487d1118c47c37cac
5
5
  SHA512:
6
- metadata.gz: 54239a3209466e3fd8d1310c0ddd4d43dce82da82b38e4870862a8553d7f9ef9c7723e5a4875232987796ddecb0ab20830d834a05871c1ac453205367006e17a
7
- data.tar.gz: 9354d473aa127c4de7f52623a2dbffeddd863d86c34b077a1fe91e8363a93d4a3cf49d43cc594f1cbb11ca8958cfc4f6bb06f3de0431c153242adbe70168708b
6
+ metadata.gz: 105d0605e77f299cb0acddd9a5e4d5b1f0dba26b523657fbe7b57cdf1f431596649dcbd3316b9fd0b0068afe5d6eaba4998a3dc3a35132d718051e0463dbd544
7
+ data.tar.gz: d9edafb104bc8cbafb54b00b0a8e86f33747d5a70b302500a6a12aa89879f42a82b6923b647541b7b38f4e1bab66bfbaa3497bdff6c3ed1ecd1ec0bef084c561
@@ -23,6 +23,9 @@ class IshManager::MapsController < IshManager::ApplicationController
23
23
 
24
24
  def create
25
25
  @map = ::Gameui::Map.new(map_params)
26
+ if map_params[:parent_slug].present?
27
+ @map.parent = ::Gameui::Map.find_by({ slug: map_params[:parent_slug] })
28
+ end
26
29
  authorize! :create, @map
27
30
 
28
31
  respond_to do |format|
@@ -37,6 +40,11 @@ class IshManager::MapsController < IshManager::ApplicationController
37
40
  def update
38
41
  authorize! :update, @map
39
42
  respond_to do |format|
43
+ if map_params[:parent_slug].present?
44
+ @map.parent = ::Gameui::Map.find_by({ slug: map_params[:parent_slug] })
45
+ else
46
+ @map.parent = nil
47
+ end
40
48
  if @map.update(map_params)
41
49
  format.html { redirect_to map_path(@map), notice: 'Map was successfully updated.' }
42
50
  else
@@ -27,6 +27,7 @@ class IshManager::MarkersController < IshManager::ApplicationController
27
27
 
28
28
  respond_to do |format|
29
29
  if @marker.save
30
+ @marker.map.touch
30
31
  format.html { redirect_to map_path(@map), notice: 'Marker was successfully created.' }
31
32
  else
32
33
  format.html { render :new }
@@ -38,6 +39,7 @@ class IshManager::MarkersController < IshManager::ApplicationController
38
39
  authorize! :update_marker, @map
39
40
  respond_to do |format|
40
41
  if @marker.update(marker_params)
42
+ @marker.map.touch
41
43
  format.html { redirect_to maps_path(@map), notice: 'Marker was successfully updated.' }
42
44
  else
43
45
  format.html { render :edit }
@@ -49,6 +51,7 @@ class IshManager::MarkersController < IshManager::ApplicationController
49
51
  @marker = ::Gameui::Marker.find params[:id]
50
52
  @map = @marker.map
51
53
  authorize! :destroy_marker, @map
54
+ @marker.map.touch
52
55
  @marker.destroy
53
56
  respond_to do |format|
54
57
  format.html { redirect_to map_path(@map), notice: 'Marker was successfully destroyed.' }
@@ -57,17 +60,17 @@ class IshManager::MarkersController < IshManager::ApplicationController
57
60
 
58
61
  private
59
62
 
60
- def set_map
61
- @map = ::Gameui::Map.find(params[:map_id] || params[:gameui_marker][:map_id])
62
- end
63
+ def set_map
64
+ @map = ::Gameui::Map.find(params[:map_id] || params[:gameui_marker][:map_id])
65
+ end
63
66
 
64
- def set_marker
65
- @marker = ::Gameui::Marker.find params[:id]
66
- @map = @marker.map
67
- end
67
+ def set_marker
68
+ @marker = ::Gameui::Marker.find params[:id]
69
+ @map = @marker.map
70
+ end
68
71
 
69
- def marker_params
70
- params.require(:gameui_marker).permit!
71
- end
72
+ def marker_params
73
+ params.require(:gameui_marker).permit!
74
+ end
72
75
 
73
76
  end
@@ -12,24 +12,28 @@
12
12
  - @map.errors.full_messages.each do |message|
13
13
  %li= message
14
14
 
15
-
16
15
  .row
16
+ .col-md-3
17
+ .field
18
+ = f.label :name
19
+ = f.text_field :name
17
20
  .col-md-3
18
21
  .field
19
22
  = f.label :slug
20
23
  = f.text_field :slug
21
- .col-md-3
22
24
  .field
23
25
  = f.label :parent_slug
24
26
  = f.text_field :parent_slug
25
- .col-md-3
27
+
28
+
29
+ .col-md-2
26
30
  .field
27
31
  = f.label :w
28
32
  = f.number_field :w
29
- .col-md-3
30
33
  .field
31
34
  = f.label :h
32
35
  = f.number_field :h
36
+
33
37
  .field
34
38
  = f.label :description
35
39
  = f.text_area :description, class: 'tinymce'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.246
4
+ version: 0.1.8.247
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox