ruhl 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -50,12 +50,9 @@ module ActionController
50
50
  action_sym = options[:action] || action_name
51
51
  object_sym = options[:object] || controller_name.singularize
52
52
 
53
- params = { :template => "#{controller_name}/#{action_sym}",
54
- :locals => {:object => presenter_for(object_sym) } }
55
53
 
56
- params[:layout] = options[:layout] if options.has_key?(:layout)
57
-
58
- render params
54
+ render :template => "#{controller_name}/#{action_sym}",
55
+ :locals => {:object => presenter_for(object_sym), :layout => options[:layout] }
59
56
  end
60
57
 
61
58
  def presenter_for(object)
data/lib/ruhl/rails.rb CHANGED
@@ -9,7 +9,12 @@ module Ruhl
9
9
  end
10
10
 
11
11
  def render(template, options = {})
12
- layout_template = @action_view.controller.active_layout(options[:layout])
12
+ if layout = options[:layout]
13
+ layout_template = @action_view.controller.send(:find_layout, layout,
14
+ @action_view.controller.send(:default_template_format) )
15
+ else
16
+ layout_template = @action_view.controller.active_layout
17
+ end
13
18
 
14
19
  if layout_template
15
20
  options[:layout] = layout_template.filename
data/ruhl.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruhl}
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Stone"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruhl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone