Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate docs for Rails v5.2, v6.1, v6.2 #157

Merged
merged 5 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ def generate_src(target_version:)
end
end

EXISTING_DIRS = %w[classes files].freeze
EXISTING_DIR_AND_FILES = %w[classes files index.html navigation.html].freeze
def remove_existing_files(target_dir)
EXISTING_DIRS.each do |dir|
EXISTING_DIR_AND_FILES.each do |dir|
rm_rf "#{target_dir}/#{dir}"
end
end
2 changes: 2 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
services:
app:
image: ruby:3.3
# Use Ruby 2.7 for older builds
# image: ruby:2.7
working_dir: /app
volumes:
- .:/app
Expand Down
490 changes: 245 additions & 245 deletions src/5.2/classes/AbstractController/Base.html

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions src/5.2/classes/AbstractController/Caching.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,22 @@ <h3 id="method-i-view_cache_dependencies">




<div class="sourcecode">

<details class="method__source">
<summary>
<span class="label">📝 Source code</span>
</summary>

<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 52
def view_cache_dependencies
self.class._view_cache_dependencies.map { |dep| instance_exec(&amp;dep) }.compact
end</code></pre>

<p class="source-link">
Source:

</p>
<div id="method-i-view_cache_dependencies_source">
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 52</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">view_cache_dependencies</span>
<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>
<span class="ruby-keyword">end</span></code></pre>
</div>
</div>

</div>
<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>

</details>

</div>


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




<div class="sourcecode">

<details class="method__source">
<summary>
<span class="label">📝 Source code</span>
</summary>

<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 58
def cache(key, options = {}, &amp;block) # :doc:
if cache_configured?
cache_store.fetch(ActiveSupport::Cache.expand_cache_key(key, :controller), options, &amp;block)
else
yield
end
end</code></pre>

<p class="source-link">
Source:

</p>
<div id="method-i-cache_source">
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 58</span>
<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>
<span class="ruby-keyword">if</span> <span class="ruby-identifier">cache_configured?</span>
<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>)
<span class="ruby-keyword">else</span>
<span class="ruby-keyword">yield</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></code></pre>
</div>
</div>

</div>
<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>

</details>

</div>



Expand Down
30 changes: 15 additions & 15 deletions src/5.2/classes/AbstractController/Caching/ClassMethods.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,22 @@ <h3 id="method-i-view_cache_dependency">




<div class="sourcecode">

<details class="method__source">
<summary>
<span class="label">📝 Source code</span>
</summary>

<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 47
def view_cache_dependency(&amp;dependency)
self._view_cache_dependencies += [dependency]
end</code></pre>

<p class="source-link">
Source:

</p>
<div id="method-i-view_cache_dependency_source">
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 47</span>
<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>)
<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>]
<span class="ruby-keyword">end</span></code></pre>
</div>
</div>

</div>
<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>

</details>

</div>



Expand Down
60 changes: 30 additions & 30 deletions src/5.2/classes/AbstractController/Caching/ConfigMethods.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,22 @@ <h3 id="method-i-cache_store">




<div class="sourcecode">

<details class="method__source">
<summary>
<span class="label">📝 Source code</span>
</summary>

<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 13
def cache_store
config.cache_store
end</code></pre>

<p class="source-link">
Source:

</p>
<div id="method-i-cache_store_source">
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 13</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cache_store</span>
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">cache_store</span>
<span class="ruby-keyword">end</span></code></pre>
</div>
</div>

</div>
<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>

</details>

</div>

<div class="method">
<h3 id="method-i-cache_store-3D">
Expand All @@ -114,22 +114,22 @@ <h3 id="method-i-cache_store-3D">




<div class="sourcecode">

<details class="method__source">
<summary>
<span class="label">📝 Source code</span>
</summary>

<pre><code class="ruby"># File actionpack/lib/abstract_controller/caching.rb, line 17
def cache_store=(store)
config.cache_store = ActiveSupport::Cache.lookup_store(store)
end</code></pre>

<p class="source-link">
Source:

</p>
<div id="method-i-cache_store-3D_source">
<pre><code class="ruby"><span class="ruby-comment"># File actionpack/lib/abstract_controller/caching.rb, line 17</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cache_store=</span>(<span class="ruby-identifier">store</span>)
<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>)
<span class="ruby-keyword">end</span></code></pre>
</div>
</div>

</div>
<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>

</details>

</div>



Expand Down
Loading