activerecord-lazy-attributes 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{activerecord-lazy-attributes}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Moritz Heidkamp"]
12
- s.date = %q{2010-10-01}
12
+ s.date = %q{2010-10-15}
13
13
  s.description = %q{A useful ActiveRecord extension to handle columns containing large amounts of data}
14
14
  s.email = %q{moritz@twoticketsplease.de}
15
15
  s.extra_rdoc_files = [
@@ -21,6 +21,7 @@ module DerGuteMoritz
21
21
  module ClassMethods
22
22
 
23
23
  def attr_lazy(*attrs)
24
+ return unless table_exists?
24
25
  normalized_attrs = attrs.map { |a| a.to_s }
25
26
  self.lazy_attributes += normalized_attrs
26
27
  self.eager_attributes = (column_names - lazy_attributes)
@@ -28,5 +28,13 @@ describe DerGuteMoritz::ActiveRecord::LazyAttributes do
28
28
  i.data?.should be_true
29
29
  i.should_not have_attribute('data')
30
30
  end
31
+
32
+ it 'should not fail for non-existing tables' do
33
+ lambda do
34
+ class Foo < ActiveRecord::Base
35
+ attr_lazy :bar
36
+ end
37
+ end.should_not raise_error
38
+ end
31
39
 
32
40
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-lazy-attributes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Moritz Heidkamp
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-01 00:00:00 +02:00
18
+ date: 2010-10-15 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency