simple_record 1.3.7 → 1.3.8
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/lib/simple_record.rb +0 -15
- data/lib/simple_record/json.rb +3 -2
- metadata +3 -3
data/lib/simple_record.rb
CHANGED
@@ -105,12 +105,6 @@ module SimpleRecord
|
|
105
105
|
include SimpleRecord::Callbacks
|
106
106
|
include SimpleRecord::Json
|
107
107
|
|
108
|
-
# Too many ActiveRecord dependencies.
|
109
|
-
# if Gem.available?('will_paginate')
|
110
|
-
# require 'will_paginate/finder'
|
111
|
-
# include WillPaginate::Finder
|
112
|
-
# end
|
113
|
-
|
114
108
|
def self.extended(base)
|
115
109
|
|
116
110
|
end
|
@@ -298,20 +292,11 @@ module SimpleRecord
|
|
298
292
|
|
299
293
|
|
300
294
|
def set_created
|
301
|
-
# puts 'SETTING CREATED'
|
302
|
-
# @created = DateTime.now
|
303
295
|
set(:created, Time.now)
|
304
|
-
# self[:created] = Time.now
|
305
|
-
# @tester = 'some test value'
|
306
|
-
# self[:tester] = 'some test value'
|
307
296
|
end
|
308
297
|
|
309
298
|
def set_updated
|
310
|
-
#puts 'SETTING UPDATED'
|
311
|
-
# @updated = DateTime.now
|
312
299
|
set(:updated, Time.now)
|
313
|
-
# self[:updated] = Time.now
|
314
|
-
# @tester = 'some test value updated'
|
315
300
|
end
|
316
301
|
|
317
302
|
|
data/lib/simple_record/json.rb
CHANGED
@@ -24,7 +24,8 @@ module SimpleRecord
|
|
24
24
|
|
25
25
|
def to_json(*a)
|
26
26
|
result = {
|
27
|
-
'json_class' => self.class.name
|
27
|
+
'json_class' => self.class.name,
|
28
|
+
'id' => self.id
|
28
29
|
}
|
29
30
|
defined_attributes_local.each_pair do |name, val|
|
30
31
|
# puts name.to_s + "=" + val.inspect
|
@@ -40,4 +41,4 @@ module SimpleRecord
|
|
40
41
|
end
|
41
42
|
|
42
43
|
end
|
43
|
-
end
|
44
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 8
|
10
|
+
version: 1.3.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Travis Reeder
|