grouped_latest 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +34 -0
- data/lib/grouped_latest.rb +35 -0
- data/lib/grouped_latest/version.rb +3 -0
- data/lib/tasks/grouped_latest_tasks.rake +4 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/category.rb +3 -0
- data/test/dummy/app/models/post.rb +4 -0
- data/test/dummy/app/models/user.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +54 -0
- data/test/dummy/config/database.yml.ci +7 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/migrate/20150221144015_create_categories.rb +9 -0
- data/test/dummy/db/migrate/20150221145152_create_users.rb +9 -0
- data/test/dummy/db/migrate/20150221145353_create_posts.rb +13 -0
- data/test/dummy/db/schema.rb +41 -0
- data/test/dummy/log/development.log +109 -0
- data/test/dummy/log/test.log +114817 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/test/fixtures/categories.yml +7 -0
- data/test/dummy/test/fixtures/posts.yml +11 -0
- data/test/dummy/test/fixtures/users.yml +7 -0
- data/test/dummy/test/models/category_test.rb +7 -0
- data/test/dummy/test/models/post_test.rb +7 -0
- data/test/dummy/test/models/user_test.rb +7 -0
- data/test/grouped_latest_test.rb +93 -0
- data/test/test_helper.rb +26 -0
- metadata +196 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/404.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class GroupedLatestTest < ActiveSupport::TestCase
|
4
|
+
STRATEGIES = %w(gl_arel_in gl_arel_exists gl_array_in)
|
5
|
+
|
6
|
+
setup do
|
7
|
+
end
|
8
|
+
|
9
|
+
test "sanity" do
|
10
|
+
assert_kind_of Module, GroupedLatest
|
11
|
+
end
|
12
|
+
|
13
|
+
test "::grouped_latest" do
|
14
|
+
return if with_bench?
|
15
|
+
|
16
|
+
init
|
17
|
+
|
18
|
+
assert_equal Category.first.posts.last,
|
19
|
+
@user.posts.grouped_latest(:category_id).where(category_id: Category.first.id).take
|
20
|
+
|
21
|
+
Post.latest_column = :created_at
|
22
|
+
assert_equal Category.last.posts.last,
|
23
|
+
@user.posts.grouped_latest(:category_id).where(category_id: Category.last.id).take
|
24
|
+
|
25
|
+
STRATEGIES.each do |strategy|
|
26
|
+
Post.latest_strategy = strategy
|
27
|
+
assert_equal Category.last.posts.last,
|
28
|
+
@user.posts.grouped_latest(:category_id).where(category_id: Category.last.id).take
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
test "benchmark" do
|
33
|
+
return unless with_bench?
|
34
|
+
|
35
|
+
init
|
36
|
+
|
37
|
+
result = ['', "Strategy\tAverage"]
|
38
|
+
STRATEGIES.each do |strategy|
|
39
|
+
result << bench(strategy)
|
40
|
+
end
|
41
|
+
puts result.join("\n")
|
42
|
+
end
|
43
|
+
|
44
|
+
def bench(strategy)
|
45
|
+
assert_equal Category.first.posts.last,
|
46
|
+
@user.posts.send(strategy, :category_id).where(category_id: Category.first.id).take
|
47
|
+
|
48
|
+
results = 0
|
49
|
+
number_of[:bench].times do
|
50
|
+
result = Benchmark.realtime { @user.posts.send(strategy, :category_id) }
|
51
|
+
results += result
|
52
|
+
end
|
53
|
+
"#{strategy}\t#{(results / number_of[:bench]) * 1000}ms"
|
54
|
+
end
|
55
|
+
|
56
|
+
def with_bench?
|
57
|
+
ENV['BENCH'].present? || ENV['BENCHMARK'].present?
|
58
|
+
end
|
59
|
+
|
60
|
+
def wip?
|
61
|
+
ENV['WIP'].present?
|
62
|
+
end
|
63
|
+
|
64
|
+
def number_of
|
65
|
+
if with_bench? && !wip?
|
66
|
+
{
|
67
|
+
categories: 100,
|
68
|
+
posts: 100,
|
69
|
+
bench: 1000,
|
70
|
+
}
|
71
|
+
else
|
72
|
+
{
|
73
|
+
categories: 2,
|
74
|
+
posts: 10,
|
75
|
+
bench: 100,
|
76
|
+
}
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def init
|
81
|
+
ActiveRecord::Base.transaction do
|
82
|
+
@user = User.create!(name: 'User 1')
|
83
|
+
1.upto(number_of[:categories]) do |i|
|
84
|
+
category = Category.create!(name: "Category #{i}")
|
85
|
+
1.upto(number_of[:posts]) do |j|
|
86
|
+
Post.create!(title: "Post #{i}-#{j}", user: @user, category: category, created_at: (i.day + j.minute).since)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
Post.send(:include, GroupedLatest)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start do
|
3
|
+
add_filter '/test/'
|
4
|
+
end
|
5
|
+
|
6
|
+
require "codeclimate-test-reporter"
|
7
|
+
CodeClimate::TestReporter.start
|
8
|
+
|
9
|
+
# Configure Rails Environment
|
10
|
+
ENV["RAILS_ENV"] = "test"
|
11
|
+
|
12
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
13
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
14
|
+
require "rails/test_help"
|
15
|
+
|
16
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
17
|
+
# to be shown.
|
18
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
19
|
+
|
20
|
+
# Load support files
|
21
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
22
|
+
|
23
|
+
# Load fixtures from the engine
|
24
|
+
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
25
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,196 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: grouped_latest
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- tnantoka
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mysql2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: simplecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Just another scope to fetch the latest record with specified group.
|
56
|
+
email:
|
57
|
+
- tnantoka@bornneet.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- MIT-LICENSE
|
63
|
+
- Rakefile
|
64
|
+
- lib/grouped_latest.rb
|
65
|
+
- lib/grouped_latest/version.rb
|
66
|
+
- lib/tasks/grouped_latest_tasks.rake
|
67
|
+
- test/dummy/README.rdoc
|
68
|
+
- test/dummy/Rakefile
|
69
|
+
- test/dummy/app/assets/javascripts/application.js
|
70
|
+
- test/dummy/app/assets/stylesheets/application.css
|
71
|
+
- test/dummy/app/controllers/application_controller.rb
|
72
|
+
- test/dummy/app/helpers/application_helper.rb
|
73
|
+
- test/dummy/app/models/category.rb
|
74
|
+
- test/dummy/app/models/post.rb
|
75
|
+
- test/dummy/app/models/user.rb
|
76
|
+
- test/dummy/app/views/layouts/application.html.erb
|
77
|
+
- test/dummy/bin/bundle
|
78
|
+
- test/dummy/bin/rails
|
79
|
+
- test/dummy/bin/rake
|
80
|
+
- test/dummy/bin/setup
|
81
|
+
- test/dummy/config.ru
|
82
|
+
- test/dummy/config/application.rb
|
83
|
+
- test/dummy/config/boot.rb
|
84
|
+
- test/dummy/config/database.yml
|
85
|
+
- test/dummy/config/database.yml.ci
|
86
|
+
- test/dummy/config/environment.rb
|
87
|
+
- test/dummy/config/environments/development.rb
|
88
|
+
- test/dummy/config/environments/production.rb
|
89
|
+
- test/dummy/config/environments/test.rb
|
90
|
+
- test/dummy/config/initializers/assets.rb
|
91
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
92
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
93
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
94
|
+
- test/dummy/config/initializers/inflections.rb
|
95
|
+
- test/dummy/config/initializers/mime_types.rb
|
96
|
+
- test/dummy/config/initializers/session_store.rb
|
97
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
98
|
+
- test/dummy/config/locales/en.yml
|
99
|
+
- test/dummy/config/routes.rb
|
100
|
+
- test/dummy/config/secrets.yml
|
101
|
+
- test/dummy/db/migrate/20150221144015_create_categories.rb
|
102
|
+
- test/dummy/db/migrate/20150221145152_create_users.rb
|
103
|
+
- test/dummy/db/migrate/20150221145353_create_posts.rb
|
104
|
+
- test/dummy/db/schema.rb
|
105
|
+
- test/dummy/log/development.log
|
106
|
+
- test/dummy/log/test.log
|
107
|
+
- test/dummy/public/404.html
|
108
|
+
- test/dummy/public/422.html
|
109
|
+
- test/dummy/public/500.html
|
110
|
+
- test/dummy/public/favicon.ico
|
111
|
+
- test/dummy/test/fixtures/categories.yml
|
112
|
+
- test/dummy/test/fixtures/posts.yml
|
113
|
+
- test/dummy/test/fixtures/users.yml
|
114
|
+
- test/dummy/test/models/category_test.rb
|
115
|
+
- test/dummy/test/models/post_test.rb
|
116
|
+
- test/dummy/test/models/user_test.rb
|
117
|
+
- test/grouped_latest_test.rb
|
118
|
+
- test/test_helper.rb
|
119
|
+
homepage: https://github.com/tnantoka/grouped_latest
|
120
|
+
licenses:
|
121
|
+
- MIT
|
122
|
+
metadata: {}
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
requirements: []
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 2.4.5
|
140
|
+
signing_key:
|
141
|
+
specification_version: 4
|
142
|
+
summary: Get the latest record from each group on ActiveRecord.
|
143
|
+
test_files:
|
144
|
+
- test/dummy/app/assets/javascripts/application.js
|
145
|
+
- test/dummy/app/assets/stylesheets/application.css
|
146
|
+
- test/dummy/app/controllers/application_controller.rb
|
147
|
+
- test/dummy/app/helpers/application_helper.rb
|
148
|
+
- test/dummy/app/models/category.rb
|
149
|
+
- test/dummy/app/models/post.rb
|
150
|
+
- test/dummy/app/models/user.rb
|
151
|
+
- test/dummy/app/views/layouts/application.html.erb
|
152
|
+
- test/dummy/bin/bundle
|
153
|
+
- test/dummy/bin/rails
|
154
|
+
- test/dummy/bin/rake
|
155
|
+
- test/dummy/bin/setup
|
156
|
+
- test/dummy/config/application.rb
|
157
|
+
- test/dummy/config/boot.rb
|
158
|
+
- test/dummy/config/database.yml
|
159
|
+
- test/dummy/config/database.yml.ci
|
160
|
+
- test/dummy/config/environment.rb
|
161
|
+
- test/dummy/config/environments/development.rb
|
162
|
+
- test/dummy/config/environments/production.rb
|
163
|
+
- test/dummy/config/environments/test.rb
|
164
|
+
- test/dummy/config/initializers/assets.rb
|
165
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
166
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
167
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
168
|
+
- test/dummy/config/initializers/inflections.rb
|
169
|
+
- test/dummy/config/initializers/mime_types.rb
|
170
|
+
- test/dummy/config/initializers/session_store.rb
|
171
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
172
|
+
- test/dummy/config/locales/en.yml
|
173
|
+
- test/dummy/config/routes.rb
|
174
|
+
- test/dummy/config/secrets.yml
|
175
|
+
- test/dummy/config.ru
|
176
|
+
- test/dummy/db/migrate/20150221144015_create_categories.rb
|
177
|
+
- test/dummy/db/migrate/20150221145152_create_users.rb
|
178
|
+
- test/dummy/db/migrate/20150221145353_create_posts.rb
|
179
|
+
- test/dummy/db/schema.rb
|
180
|
+
- test/dummy/log/development.log
|
181
|
+
- test/dummy/log/test.log
|
182
|
+
- test/dummy/public/404.html
|
183
|
+
- test/dummy/public/422.html
|
184
|
+
- test/dummy/public/500.html
|
185
|
+
- test/dummy/public/favicon.ico
|
186
|
+
- test/dummy/Rakefile
|
187
|
+
- test/dummy/README.rdoc
|
188
|
+
- test/dummy/test/fixtures/categories.yml
|
189
|
+
- test/dummy/test/fixtures/posts.yml
|
190
|
+
- test/dummy/test/fixtures/users.yml
|
191
|
+
- test/dummy/test/models/category_test.rb
|
192
|
+
- test/dummy/test/models/post_test.rb
|
193
|
+
- test/dummy/test/models/user_test.rb
|
194
|
+
- test/grouped_latest_test.rb
|
195
|
+
- test/test_helper.rb
|
196
|
+
has_rdoc:
|