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 +1 -1
- data/lib/ruhl/rails/ruhl_presenter.rb +2 -5
- data/lib/ruhl/rails.rb +6 -1
- data/ruhl.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
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
|
-
|
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
|
-
|
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