File tree 2 files changed +15
-10
lines changed
2 files changed +15
-10
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ def self.testing_string
26
26
27
27
post "/*" do
28
28
if params [ "page" ]
29
- puts params
30
29
@css = params [ "page" ] [ "css" ]
31
30
css_to_sass ( params [ "commit" ] )
32
31
@@ -44,20 +43,16 @@ def css_to_sass(type={})
44
43
if type . eql? ( "Convert 2 SCSS" )
45
44
if convert_to_scss ( @css ) . class == String
46
45
@sass = convert_to_scss ( @css )
47
- flash [ :error ] = '' # TODO: Fix this shit!
48
- flash [ :success ] = 'Creativity is a habit.'
46
+ flash_notice
49
47
else
50
- flash [ :success ] = '' # TODO: Same crap!
51
- flash [ :error ] = "Dude, nasty error! - #{ @error } "
48
+ flash_error
52
49
end
53
50
else
54
51
if convert_to_sass ( @css ) . class == String
55
52
@sass = convert_to_sass ( @css )
56
- flash [ :error ] = ''
57
- flash [ :success ] = 'Creativity is a habit.'
53
+ flash_notice
58
54
else
59
- flash [ :success ] = ''
60
- flash [ :error ] = "Dude, nasty error! - #{ @error } "
55
+ flash_error
61
56
end
62
57
end
63
58
end
@@ -91,4 +86,15 @@ def to_xml
91
86
end
92
87
end
93
88
end
89
+
90
+ def flash_notice
91
+ flash [ :error ] = ''
92
+ flash [ :success ] = 'Creativity is a habit.'
93
+ end
94
+
95
+ def flash_error
96
+ flash [ :success ] = ''
97
+ flash [ :error ] = "Dude, nasty error! - #{ @error } "
98
+ end
99
+
94
100
end
You can’t perform that action at this time.
0 commit comments