kiss 0.9.1 → 0.9.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.
- data/VERSION +1 -1
- data/lib/kiss/action.rb +3 -2
- data/lib/kiss.rb +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.2
|
data/lib/kiss/action.rb
CHANGED
@@ -10,7 +10,7 @@ class Kiss
|
|
10
10
|
@@controller = controller
|
11
11
|
end
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
# Instance Methods
|
15
15
|
|
16
16
|
# Raises custom error message for missing methods, specifying current action
|
@@ -134,7 +134,8 @@ class Kiss
|
|
134
134
|
end
|
135
135
|
|
136
136
|
@base_url ||= app(action_subdir + '/')
|
137
|
-
@layout = options.is_a?(Hash) && options.has_key?(:layout) ? options[:layout] :
|
137
|
+
@layout = options.is_a?(Hash) && options.has_key?(:layout) ? options[:layout] :
|
138
|
+
(extension == 'rhtml' ? "/_layout" : nil)
|
138
139
|
|
139
140
|
content = options[:content].is_a?(String) ? options[:content] : process({
|
140
141
|
:template => action,
|
data/lib/kiss.rb
CHANGED
@@ -698,7 +698,7 @@ class Kiss
|
|
698
698
|
# Raises Kiss::ActionDone exception to bypass caller stack and return directly
|
699
699
|
# to Kiss#call.
|
700
700
|
def send_response(output = '',options = {})
|
701
|
-
content_type = options[:content_type] || @content_type || extension ? @@content_types[extension.to_sym] : nil
|
701
|
+
content_type = options[:content_type] || @content_type || (extension ? @@content_types[extension.to_sym] : nil)
|
702
702
|
document_encoding ||= 'utf-8'
|
703
703
|
|
704
704
|
@response['Content-Type'] = "#{content_type}; #{document_encoding}" if content_type
|