kiss 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/kiss/action.rb +3 -2
  3. data/lib/kiss.rb +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
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] : "/_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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Van Ittersum