ruhl 1.3.0 → 1.3.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 +8 -5
- data/ruhl.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.1
|
@@ -47,13 +47,16 @@ module ActionController
|
|
47
47
|
protected
|
48
48
|
|
49
49
|
def present(options = {})
|
50
|
-
|
51
|
-
object_sym = options[:object] || controller_name.singularize
|
52
|
-
controller_sym = options[:controller] || controller_name
|
50
|
+
controller_option = options.delete(:controller)
|
53
51
|
|
52
|
+
action_sym = options.delete(:action) || action_name
|
53
|
+
object_sym = options.delete(:object) || controller_option || controller_name.singularize
|
54
|
+
controller_sym = controller_option || controller_name
|
54
55
|
|
55
|
-
|
56
|
-
|
56
|
+
options[:template] = "#{controller_sym}/#{action_sym}"
|
57
|
+
options[:locals] = {:object => presenter_for(object_sym), :layout => options.delete(:layout) }
|
58
|
+
|
59
|
+
render options
|
57
60
|
end
|
58
61
|
|
59
62
|
def presenter_for(object)
|
data/ruhl.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruhl}
|
8
|
-
s.version = "1.3.
|
8
|
+
s.version = "1.3.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"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-15}
|
13
13
|
s.description = %q{Make your HTML dynamic with the addition of a data-ruhl attribute.}
|
14
14
|
s.email = %q{andy@stonean.com}
|
15
15
|
s.extra_rdoc_files = [
|
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.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Stone
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-15 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|