ruhl 0.12.1 → 0.13.0
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 +8 -0
- data/ruhl.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.13.0
|
@@ -15,6 +15,14 @@ end
|
|
15
15
|
|
16
16
|
module ActionController
|
17
17
|
class Base
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def present(object_sym, action_sym)
|
22
|
+
render :template => "#{object_sym.to_s.pluralize}/#{action_sym}",
|
23
|
+
:locals => {:object => presenter_for( instance_variable_get("@#{object_sym}") )}
|
24
|
+
end
|
25
|
+
|
18
26
|
def presenter_for(obj)
|
19
27
|
eval("#{obj.class.name}Presenter").new(obj, @template)
|
20
28
|
end
|
data/ruhl.gemspec
CHANGED