chili_pepper 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e833710587c77fa5ea24801d0d4b1120ae53da61
|
4
|
+
data.tar.gz: ffe08ad409952abae8ea429d9e7d9d0cdcd8d40d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 739f097e9ef3cd94149197029cce97984f30be8bdb24c3988232678d8c457f4a37ba2a0a0357ef9d9d63cfb4c8dc027f663ac5b0a759c8f391f802723d2d7e88
|
7
|
+
data.tar.gz: aa572699352ada43f1255414e64bfd02f67691cc4b0f81c7715d4dc6ec97d336604d2588ccac2719f5d3d66e3518ff47af8f2665955c4a4f6e3b080d69b6cfdb
|
@@ -22,7 +22,6 @@ module ChiliPepper
|
|
22
22
|
|
23
23
|
def show
|
24
24
|
@similar_menus = pick_similar_menus
|
25
|
-
|
26
25
|
if @menu.sections.any?
|
27
26
|
redirect_to menu_section_path(@menu, @menu.sections.position_sorted.first)
|
28
27
|
else
|
@@ -41,7 +40,7 @@ module ChiliPepper
|
|
41
40
|
if @menu.save
|
42
41
|
redirect_to action: 'show', id: @menu
|
43
42
|
# set_annotations_positions(@menu)
|
44
|
-
|
43
|
+
clear_menu_caches
|
45
44
|
else
|
46
45
|
render action: :new
|
47
46
|
end
|
@@ -54,7 +53,7 @@ module ChiliPepper
|
|
54
53
|
if @menu.update(menu_params)
|
55
54
|
redirect_to action: 'show', id: @menu
|
56
55
|
# set_annotations_positions(@menu)
|
57
|
-
|
56
|
+
clear_menu_caches
|
58
57
|
else
|
59
58
|
render action: :edit
|
60
59
|
end
|
@@ -62,6 +61,7 @@ module ChiliPepper
|
|
62
61
|
|
63
62
|
def destroy
|
64
63
|
@menu.destroy
|
64
|
+
clear_menu_caches
|
65
65
|
redirect_to action: :index
|
66
66
|
end
|
67
67
|
|
@@ -69,16 +69,22 @@ module ChiliPepper
|
|
69
69
|
params[:menu].each_with_index do |id, index|
|
70
70
|
Menu.find(id).update_attributes(position: index + 1)
|
71
71
|
end
|
72
|
+
clear_menu_caches
|
72
73
|
render nothing: true
|
73
74
|
end
|
74
75
|
|
75
76
|
def duplicate
|
76
77
|
@menu.duplicate
|
78
|
+
clear_menu_caches
|
77
79
|
redirect_to menu_path(Menu.same_type_menus(@menu.menu_type).last)
|
78
80
|
end
|
79
81
|
|
80
82
|
private
|
81
83
|
|
84
|
+
def clear_menu_caches
|
85
|
+
Menu.all.each(&:touch)
|
86
|
+
end
|
87
|
+
|
82
88
|
def menu
|
83
89
|
@menu = Menu.friendly.find(params[:id]).decorate
|
84
90
|
end
|
@@ -7,7 +7,8 @@ module ChiliPepper
|
|
7
7
|
no_intra_emphasis: true
|
8
8
|
}
|
9
9
|
rtxt = Redcarpet::Markdown.new(renderer, options).render(text)
|
10
|
-
|
10
|
+
matched_string = Regexp.new(/\A<p>(.*)<\/p>\Z/m).match(rtxt)
|
11
|
+
return matched_string[1].html_safe if matched_string.present?
|
11
12
|
end
|
12
13
|
|
13
14
|
def cache_or_admin(fragment_name, &block_to_be_executed)
|
data/lib/chili_pepper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chili_pepper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loic Seigland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -448,7 +448,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
448
448
|
version: '0'
|
449
449
|
requirements: []
|
450
450
|
rubyforge_project:
|
451
|
-
rubygems_version: 2.
|
451
|
+
rubygems_version: 2.2.0
|
452
452
|
signing_key:
|
453
453
|
specification_version: 4
|
454
454
|
summary: Rapid Creation of CMS for restaurant websites.
|