remetric 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 446c835bf88d105b1c073512715de50651b4c4bc
4
- data.tar.gz: c6f974824f212dd25f5af74ef5ffa905b2791633
3
+ metadata.gz: 719a7271c69b7d7c7b86f8b44ab1e597be94e8b7
4
+ data.tar.gz: 9a146251b7529e4a9f988895b2fafafc32ce0073
5
5
  SHA512:
6
- metadata.gz: f6fceef078468d948699c035dba6f231daa7bd207b102dcfa80f09bd1e668b9d8b89ae75f216405a64d6330d82aed25004e35d185a200c73bae8c62351298bd8
7
- data.tar.gz: 9cca9d8bbf7b974d40c65e0a90c0465c18f59db0727b7cb96557eedaa5fd955155541873a8bdecdf0b723ea68d2f9f272875e1326fa8df24523e6bb96b96fa24
6
+ metadata.gz: e7a2360b34db5ecc79f41d670e5f76626aa1a7f4e48d0cb08919eb7c866a2e8d6c43d5e2ad899fa21f5c594495b3fb237450e663c02fd0b49b446aa1ce0f22c3
7
+ data.tar.gz: 23fb8f4fe86f5f14d5a01b68afe3a0dd5f3877e783c42aa693ca6ddd7244af9d3a8850f674cd3b702a72c673d27289a70931c827f946bac16f0d85f926f5906c
data/README.rdoc CHANGED
@@ -4,4 +4,7 @@
4
4
  2. gem "mongoid", '~> 4.0.0.beta1', github: 'mongoid/mongoid'
5
5
  3. bundle install
6
6
  4. remetric.rb
7
- 5. mongoid.yml
7
+ 5. mongoid.yml
8
+
9
+ == Attributes
10
+ Defaults to `.attributes`, but uses `remetric_attributes` if available.
@@ -41,7 +41,13 @@ module Remetric
41
41
 
42
42
  if self.has_attribute? model
43
43
  args = self.send(model)
44
- args = args.attributes if args.class.ancestors.include? ActiveRecord::Base
44
+
45
+ if args.method_defined? :remetric_attributes
46
+ args = args.remetric_attributes
47
+ elsif args.class.ancestors.include? ActiveRecord::Base
48
+ args = args.attributes
49
+ end
50
+
45
51
  args = args.with_indifferent_access
46
52
  key_field = cols[:key]
47
53
  key_field = :id if key_field.blank?
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
 
11
11
  <p class="align_center">
12
- <%= link_to "Remetric v0.0.6", "https://github.com/dallas22ca/remetric" %>
12
+ <%= link_to "&copy; 2014 Remetric".html_safe, "https://github.com/dallas22ca/remetric" %>
13
13
  </p>
14
14
 
15
15
  <div class="clear"></div>
@@ -1,3 +1,3 @@
1
1
  module Remetric
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remetric
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dallas Read