Skip to content

Commit 9ca6809

Browse files
authored
Merge pull request #157 from toshimaru/regenerate-docs-for-rails-v6
Generate docs for Rails v5.2, v6.1, v6.2
2 parents ec7870a + ec147a5 commit 9ca6809

File tree

5,613 files changed

+232759
-233744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,613 files changed

+232759
-233744
lines changed

Diff for: Rakefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def generate_src(target_version:)
9999
end
100100
end
101101

102-
EXISTING_DIRS = %w[classes files].freeze
102+
EXISTING_DIR_AND_FILES = %w[classes files index.html navigation.html].freeze
103103
def remove_existing_files(target_dir)
104-
EXISTING_DIRS.each do |dir|
104+
EXISTING_DIR_AND_FILES.each do |dir|
105105
rm_rf "#{target_dir}/#{dir}"
106106
end
107107
end

Diff for: compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
services:
22
app:
33
image: ruby:3.3
4+
# Use Ruby 2.7 for older builds
5+
# image: ruby:2.7
46
working_dir: /app
57
volumes:
68
- .:/app

Diff for: src/5.2/classes/AbstractController/Base.html

+245-245
Large diffs are not rendered by default.

Diff for: src/5.2/classes/AbstractController/Caching.html

+34-34
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,22 @@ <h3 id="method-i-view_cache_dependencies">
120120

121121

122122

123-
124-
<div class="sourcecode">
123+
124+
<details class="method__source">
125+
<summary>
126+
<span class="label">📝 Source code</span>
127+
</summary>
128+
129+
<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 52
130+
def view_cache_dependencies
131+
self.class._view_cache_dependencies.map { |dep| instance_exec(&amp;dep) }.compact
132+
end</code></pre>
125133

126-
<p class="source-link">
127-
Source:
128-
129-
</p>
130-
<div id="method-i-view_cache_dependencies_source">
131-
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 52</span>
132-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">view_cache_dependencies</span>
133-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">_view_cache_dependencies</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_exec</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">dep</span>) }.<span class="ruby-identifier">compact</span>
134-
<span class="ruby-keyword">end</span></code></pre>
135-
</div>
136-
</div>
137-
138-
</div>
134+
<a href="https://github.com/rails/rails/blob/26521331e5923a0c50fa50984d2f924e5f26c50b/actionpack/lib/abstract_controller/caching.rb#L52" target="_blank" class="github_url">🔎 See on GitHub</a>
135+
136+
</details>
137+
138+
</div>
139139

140140

141141
<h2 id="instance-private-methods">Instance Private methods</h2>
@@ -158,26 +158,26 @@ <h3 id="method-i-cache">
158158

159159

160160

161-
162-
<div class="sourcecode">
161+
162+
<details class="method__source">
163+
<summary>
164+
<span class="label">📝 Source code</span>
165+
</summary>
166+
167+
<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 58
168+
def cache(key, options = {}, &amp;block) # :doc:
169+
if cache_configured?
170+
cache_store.fetch(ActiveSupport::Cache.expand_cache_key(key, :controller), options, &amp;block)
171+
else
172+
yield
173+
end
174+
end</code></pre>
163175

164-
<p class="source-link">
165-
Source:
166-
167-
</p>
168-
<div id="method-i-cache_source">
169-
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 58</span>
170-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cache</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-comment"># :doc:</span>
171-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">cache_configured?</span>
172-
<span class="ruby-identifier">cache_store</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">Cache</span>.<span class="ruby-identifier">expand_cache_key</span>(<span class="ruby-identifier">key</span>, <span class="ruby-value">:controller</span>), <span class="ruby-identifier">options</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
173-
<span class="ruby-keyword">else</span>
174-
<span class="ruby-keyword">yield</span>
175-
<span class="ruby-keyword">end</span>
176-
<span class="ruby-keyword">end</span></code></pre>
177-
</div>
178-
</div>
179-
180-
</div>
176+
<a href="https://github.com/rails/rails/blob/26521331e5923a0c50fa50984d2f924e5f26c50b/actionpack/lib/abstract_controller/caching.rb#L58" target="_blank" class="github_url">🔎 See on GitHub</a>
177+
178+
</details>
179+
180+
</div>
181181

182182

183183

Diff for: src/5.2/classes/AbstractController/Caching/ClassMethods.html

+15-15
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,22 @@ <h3 id="method-i-view_cache_dependency">
7575

7676

7777

78-
79-
<div class="sourcecode">
78+
79+
<details class="method__source">
80+
<summary>
81+
<span class="label">📝 Source code</span>
82+
</summary>
83+
84+
<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 47
85+
def view_cache_dependency(&amp;dependency)
86+
self._view_cache_dependencies += [dependency]
87+
end</code></pre>
8088

81-
<p class="source-link">
82-
Source:
83-
84-
</p>
85-
<div id="method-i-view_cache_dependency_source">
86-
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 47</span>
87-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">view_cache_dependency</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">dependency</span>)
88-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">_view_cache_dependencies</span> <span class="ruby-operator">+=</span> [<span class="ruby-identifier">dependency</span>]
89-
<span class="ruby-keyword">end</span></code></pre>
90-
</div>
91-
</div>
92-
93-
</div>
89+
<a href="https://github.com/rails/rails/blob/26521331e5923a0c50fa50984d2f924e5f26c50b/actionpack/lib/abstract_controller/caching.rb#L47" target="_blank" class="github_url">🔎 See on GitHub</a>
90+
91+
</details>
92+
93+
</div>
9494

9595

9696

Diff for: src/5.2/classes/AbstractController/Caching/ConfigMethods.html

+30-30
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,22 @@ <h3 id="method-i-cache_store">
7979

8080

8181

82-
83-
<div class="sourcecode">
82+
83+
<details class="method__source">
84+
<summary>
85+
<span class="label">📝 Source code</span>
86+
</summary>
87+
88+
<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 13
89+
def cache_store
90+
config.cache_store
91+
end</code></pre>
8492

85-
<p class="source-link">
86-
Source:
87-
88-
</p>
89-
<div id="method-i-cache_store_source">
90-
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 13</span>
91-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cache_store</span>
92-
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">cache_store</span>
93-
<span class="ruby-keyword">end</span></code></pre>
94-
</div>
95-
</div>
96-
97-
</div>
93+
<a href="https://github.com/rails/rails/blob/26521331e5923a0c50fa50984d2f924e5f26c50b/actionpack/lib/abstract_controller/caching.rb#L13" target="_blank" class="github_url">🔎 See on GitHub</a>
94+
95+
</details>
96+
97+
</div>
9898

9999
<div class="method">
100100
<h3 id="method-i-cache_store-3D">
@@ -114,22 +114,22 @@ <h3 id="method-i-cache_store-3D">
114114

115115

116116

117-
118-
<div class="sourcecode">
117+
118+
<details class="method__source">
119+
<summary>
120+
<span class="label">📝 Source code</span>
121+
</summary>
122+
123+
<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 17
124+
def cache_store=(store)
125+
config.cache_store = ActiveSupport::Cache.lookup_store(store)
126+
end</code></pre>
119127

120-
<p class="source-link">
121-
Source:
122-
123-
</p>
124-
<div id="method-i-cache_store-3D_source">
125-
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 17</span>
126-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cache_store=</span>(<span class="ruby-identifier">store</span>)
127-
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">cache_store</span> = <span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">Cache</span>.<span class="ruby-identifier">lookup_store</span>(<span class="ruby-identifier">store</span>)
128-
<span class="ruby-keyword">end</span></code></pre>
129-
</div>
130-
</div>
131-
132-
</div>
128+
<a href="https://github.com/rails/rails/blob/26521331e5923a0c50fa50984d2f924e5f26c50b/actionpack/lib/abstract_controller/caching.rb#L17" target="_blank" class="github_url">🔎 See on GitHub</a>
129+
130+
</details>
131+
132+
</div>
133133

134134

135135

0 commit comments

Comments
 (0)