2eecfd8f9d
This allows using `CacheMarkdownField` for models that are not backed by ActiveRecord. When the including class inherits `ActiveRecord::Base` we include `Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the markdown fields to be rendered and the generated HTML stored in a `<field>_html` attribute on the record. We also store the version used for generating the markdown. All other classes that include this model will include the `Gitlab::MarkdownCache::Redis::Extension`. This add the `<field>_html` attributes to that model and will generate the html in them. The generated HTML will be cached in redis under the key `markdown_cache:<class>:<id>`. The class this included in must therefore respond to `id`. |
||
---|---|---|
.. | ||
admin | ||
atom | ||
boards | ||
clusters | ||
commits | ||
dashboard | ||
discussion_comments | ||
explore | ||
groups | ||
ics | ||
ide | ||
import | ||
instance_statistics | ||
issuables | ||
issues | ||
markdown | ||
merge_request | ||
merge_requests | ||
milestones | ||
profiles | ||
projects | ||
reportable_note | ||
search | ||
security | ||
snippets | ||
tags | ||
uploads | ||
users | ||
abuse_report_spec.rb | ||
calendar_spec.rb | ||
commits_spec.rb | ||
container_registry_spec.rb | ||
cycle_analytics_spec.rb | ||
display_system_header_and_footer_bar_spec.rb | ||
error_pages_spec.rb | ||
expand_collapse_diffs_spec.rb | ||
global_search_spec.rb | ||
group_variables_spec.rb | ||
groups_spec.rb | ||
help_pages_spec.rb | ||
ide_spec.rb | ||
invites_spec.rb | ||
issues_spec.rb | ||
labels_hierarchy_spec.rb | ||
milestone_spec.rb | ||
oauth_login_spec.rb | ||
participants_autocomplete_spec.rb | ||
password_reset_spec.rb | ||
profile_spec.rb | ||
project_variables_spec.rb | ||
projects_spec.rb | ||
protected_branches_spec.rb | ||
protected_tags_spec.rb | ||
raven_js_spec.rb | ||
read_only_spec.rb | ||
runners_spec.rb | ||
signed_commits_spec.rb | ||
snippets_spec.rb | ||
task_lists_spec.rb | ||
triggers_spec.rb | ||
u2f_spec.rb | ||
unsubscribe_links_spec.rb | ||
usage_stats_consent_spec.rb | ||
user_can_display_performance_bar_spec.rb | ||
user_opens_link_to_comment.rb | ||
user_sees_revert_modal_spec.rb | ||
user_sorts_things_spec.rb |