rails_dm_datastore 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rails_dm_datastore.rb +19 -0
- data/rails_dm_datastore.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/lib/rails_dm_datastore.rb
CHANGED
@@ -37,3 +37,22 @@ module Extlib
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
40
|
+
|
41
|
+
# makes the shorthand <%= render @posts %> work for collections of DataMapper objects
|
42
|
+
module ActionView
|
43
|
+
module Partials
|
44
|
+
alias :render_partial_orig :render_partial
|
45
|
+
private
|
46
|
+
|
47
|
+
def render_partial(options = {})
|
48
|
+
if DataMapper::Collection === options[:partial]
|
49
|
+
collection = options[:partial]
|
50
|
+
options[:partial] = options[:partial].first.class.to_s.tableize.singular
|
51
|
+
render_partial_collection(options.merge(:collection => collection))
|
52
|
+
else
|
53
|
+
render_partial_orig(options)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
data/rails_dm_datastore.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails_dm_datastore}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["joshsmoore"]
|
12
|
-
s.date = %q{2010-01-
|
12
|
+
s.date = %q{2010-01-14}
|
13
13
|
s.description = %q{Integrate datamapper to Rails for the Google App Engine}
|
14
14
|
s.email = %q{joshsmoore@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_dm_datastore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joshsmoore
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-14 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|