datastax_rails 1.0.14 → 1.0.14.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,11 @@ module DatastaxRails
|
|
14
14
|
end
|
15
15
|
|
16
16
|
module ClassMethods
|
17
|
+
# Provide some measure of compatibility with things that expect this from ActiveRecord.
|
18
|
+
def columns_hash
|
19
|
+
self.attribute_defintions
|
20
|
+
end
|
21
|
+
|
17
22
|
# We need to ensure that inherited classes get their own attribute definitions.
|
18
23
|
# In addition, we take the opportunity to track all the DatastaxRails::Base decendents.
|
19
24
|
# This will be useful when it comes to things like schema generation.
|
data/lib/datastax_rails/base.rb
CHANGED
@@ -352,7 +352,7 @@ module DatastaxRails #:nodoc:
|
|
352
352
|
if respond_to?("#{k.to_s.downcase}=")
|
353
353
|
send("#{k.to_s.downcase}=",v)
|
354
354
|
else
|
355
|
-
raise(UnknownAttributeError, "unknown attribute: #{k}")
|
355
|
+
raise(DatastaxRails::UnknownAttributeError, "unknown attribute: #{k}")
|
356
356
|
end
|
357
357
|
end
|
358
358
|
|
@@ -56,10 +56,10 @@ module DatastaxRails
|
|
56
56
|
:indexed => true,
|
57
57
|
:stored => false,
|
58
58
|
:multi_valued => false })
|
59
|
-
@copy_fields.push({ :source => attr.name, :dest => "sort_" + attr.name })
|
59
|
+
@copy_fields.push({ :source => attr.name, :dest => "sort_" + attr.name }) if (coder.options[:indexed] || coder.options[:stored])
|
60
60
|
end
|
61
61
|
if coder.options[:fulltext]
|
62
|
-
@fulltext_fields << attr.name
|
62
|
+
@fulltext_fields << attr.name if (coder.options[:indexed] || coder.options[:stored])
|
63
63
|
end
|
64
64
|
end
|
65
65
|
# Sort the fields so that no matter what order the attributes are arranged into the
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datastax_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 101
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 14
|
10
|
-
|
10
|
+
- 1
|
11
|
+
version: 1.0.14.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Jason M. Kusar
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2012-09-
|
19
|
+
date: 2012-09-19 00:00:00 Z
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: rails
|