table_checksum 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.md +5 -1
- data/lib/table_checksum.rb +4 -0
- data/table_checksum.gemspec +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -7,11 +7,15 @@ Gem adds methods to the ActiveRecord::Base classes to easily generate checksum o
|
|
7
7
|
|
8
8
|
This is useful for fragment caching when you list all records from table in cached partial
|
9
9
|
|
10
|
-
|
10
|
+
<% cache [@event, User.checksum] do %>
|
11
11
|
...
|
12
12
|
<%= f.collection_select :user_id, @users || User.all, :id, :name %>
|
13
13
|
...
|
14
14
|
<% end %>
|
15
|
+
|
16
|
+
You can also omit the `checksum` method because ActiveRecord::Base now responds to `cache_key` method
|
17
|
+
|
18
|
+
<% cache [@event, User] do %>
|
15
19
|
|
16
20
|
It also uses PerRequestCache for performance.
|
17
21
|
|
data/lib/table_checksum.rb
CHANGED
data/table_checksum.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
$:.push File.expand_path("../lib", __FILE__)
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'table_checksum'
|
4
|
-
s.version = '0.0.
|
4
|
+
s.version = '0.0.2'
|
5
5
|
s.summary = "Table checksum"
|
6
6
|
s.description = "Creates checksum of tables/models using CREATE CHECKSUM sql query"
|
7
7
|
s.authors = ["Filip Zachar"]
|