archive_2s 0.0.1 → 0.0.2
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/README.rdoc
CHANGED
@@ -17,11 +17,22 @@ fetch by id only (as all that is saved is the id and a value of a method)
|
|
17
17
|
|
18
18
|
All objects returned are readonly.
|
19
19
|
|
20
|
+
== Migration
|
21
|
+
See the last todo, this needs to me a generator/rake task but I am tired and want to goto sleep
|
22
|
+
create_table :archived_to_s do |t|
|
23
|
+
t.datetime :archived_at
|
24
|
+
t.string :model_type
|
25
|
+
t.integer :model_id
|
26
|
+
t.string :archived_value
|
27
|
+
end
|
28
|
+
add_index :archived_to_s, [:model_type,:model_id,:archived_at], :name => 'model_and_archive_date_idx', :unique => true
|
29
|
+
|
20
30
|
==Todo
|
21
31
|
* make some proxy magic so if one calls a relationship if can search the archive too
|
22
32
|
* use wants rather then returning based on length
|
23
33
|
* drop the id column and use the index for the model
|
24
34
|
* make the doco usefull
|
35
|
+
* make a generator for rails 2 and 3
|
25
36
|
|
26
37
|
== Copyright
|
27
38
|
|
data/lib/archive_2s/version.rb
CHANGED
data/lib/archive_2s.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archive_2s
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- SmashTank Apps, LLC
|
@@ -153,8 +153,6 @@ files:
|
|
153
153
|
- bin/thor
|
154
154
|
- bin/tilt
|
155
155
|
- bin/tt
|
156
|
-
- generators/archive_2s_model/archive_2s_model_generator.rb
|
157
|
-
- generators/archive_2s_model/templates/create_archive_2s_model.rb
|
158
156
|
- init.rb
|
159
157
|
- lib/archive_2s.rb
|
160
158
|
- lib/archive_2s/model.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateArchive2sModel < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :archived_to_s do |t|
|
4
|
-
t.datetime :archived_at
|
5
|
-
t.string :model_type
|
6
|
-
t.integer :model_id
|
7
|
-
t.string :archived_value
|
8
|
-
end
|
9
|
-
add_index :archived_to_s, [:model_type,:model_id,:archived_at], :name => 'model_and_archive_date_idx', :unique => true
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
drop_table :archived_to_s
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|