dokno 1.3.0 → 1.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edd6bc7f282e312599b5d844e48382a5eff63604c13b05d41859c1beb587e878
4
- data.tar.gz: b692a98a50654ae4d7d7a77b123289da686ab37131a0bbdf0f4ffc9151b5a1ab
3
+ metadata.gz: f136bc4f785f0f392e5e76d19b55d74ae59f59f96f144049cb9e288aaaaeced5
4
+ data.tar.gz: 117835447f5ef02db4c18de8453f7053a977cec6349528a6b3d15250da42ae0a
5
5
  SHA512:
6
- metadata.gz: ce6b652432db90585a4b72fe2327a5201409d9872c3408b74d7e5a52253d960b2ce1286fad4c762e09f2d4b72134d49174c4bbe3d4fc02203de1b3d95cc8077c
7
- data.tar.gz: ae70e70feb6f78cc30daf751085ef58f50a26b45c9faa1276b5723fdb685c08ada77ff02ba5dee1a781a90c3852d0822702e7a410a2e952baef1545ded3408b2
6
+ metadata.gz: a49495dd1c51f2eac0508d8df2a7bc34f97a8f7cfa2699f36a3cebfbcc3b5012c7ccf80f1bcc730815a644b08ac4021e02fa0f5fd2b39bac1c86d8c0cbbed13b
7
+ data.tar.gz: ebe01549788e0f4ab21eb36b1b11a0b7d21518dc4626cba64543e6c3ca66a6de8ea7bc311df6490489df22f51f239b0cb544af79bb2ce7af146a6938be829b8b
@@ -46,7 +46,7 @@ function applyCategoryCriteria(category_code, term, order) {
46
46
 
47
47
  function goToPage(url) {
48
48
  var param_join = url.indexOf('?') >= 0 ? '&' : '?';
49
- location.href=url + param_join + '_=' + Math.round(new Date().getTime());
49
+ location.href = url + param_join + '_=' + Math.round(new Date().getTime());
50
50
  }
51
51
 
52
52
  function reloadPage() {
@@ -74,14 +74,9 @@ function sendRequest(url, data, callback, method) {
74
74
  request.send(JSON.stringify(data));
75
75
  }
76
76
 
77
- function deactivateArticle(slug) {
77
+ function setArticleStatus(slug, active) {
78
78
  const callback = function(_data) { reloadPage(); }
79
- sendRequest(dokno__base_path + 'article_status', { slug: slug, active: false }, callback, 'POST');
80
- }
81
-
82
- function activateArticle(slug) {
83
- const callback = function(_data) { reloadPage(); }
84
- sendRequest(dokno__base_path + 'article_status', { slug: slug, active: true }, callback, 'POST');
79
+ sendRequest(dokno__base_path + 'article_status', { slug: slug, active: active }, callback, 'POST');
85
80
  }
86
81
 
87
82
  function deleteArticle(id) {
@@ -60,10 +60,10 @@ module Dokno
60
60
  @article.categories = Category.where(code: params[:category_code])
61
61
  redirect_to article_path @article.slug
62
62
  else
63
- flash.now[:red] = 'Article could not be updated'
64
- @category_codes = params[:category_code]
65
- @reset_review_date = params[:reset_review_date]
66
- @review_notes = params[:review_notes]
63
+ flash.now[:red] = 'Article could not be updated'
64
+ @category_codes = params[:category_code]
65
+ @reset_review_date = params[:reset_review_date]
66
+ @review_notes = params[:review_notes]
67
67
  render :edit
68
68
  end
69
69
  end
@@ -6,9 +6,10 @@ module Dokno
6
6
  before_action :fetch_category, only: [:index, :edit, :update]
7
7
 
8
8
  def index
9
- @search_term = params[:search_term]
10
- @order = params[:order]&.strip
11
- @order = 'updated' unless %w(updated newest views alpha).include?(@order)
9
+ @search_term = params[:search_term]
10
+ @order = params[:order]&.strip
11
+ @order = 'updated' unless %w(updated newest views alpha).include?(@order)
12
+ @show_up_for_review = can_edit? && !request.path.include?(up_for_review_path)
12
13
 
13
14
  articles = if request.path.include? up_for_review_path
14
15
  Article.up_for_review(order: @order&.to_sym)
@@ -3,11 +3,11 @@ module Dokno
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  def paginate(records, max_per_page: 10)
6
- @page = params[:page].to_i
7
- @total_records = records.size
8
- @total_pages = (@total_records.to_f / max_per_page).ceil
9
- @total_pages = 1 unless @total_pages.positive?
10
- @page = 1 unless @page.positive? && @page <= @total_pages
6
+ @page = params[:page].to_i
7
+ @total_records = records.size
8
+ @total_pages = (@total_records.to_f / max_per_page).ceil
9
+ @total_pages = 1 unless @total_pages.positive?
10
+ @page = 1 unless @page.positive? && @page <= @total_pages
11
11
 
12
12
  records.offset((@page - 1) * max_per_page).limit(max_per_page)
13
13
  end
@@ -28,7 +28,7 @@ module Dokno
28
28
  def can_edit?
29
29
  # Allow editing by default if host app user object is not configured
30
30
  return true unless sanitized_user_obj_string.present?
31
- return false unless user.respond_to? Dokno.config.app_user_auth_method.to_sym
31
+ return false unless user&.respond_to? Dokno.config.app_user_auth_method.to_sym
32
32
 
33
33
  user.send(Dokno.config.app_user_auth_method.to_sym)
34
34
  end
@@ -9,7 +9,7 @@ module Dokno
9
9
 
10
10
  return "Dokno article slug '#{slug}' not found" if article.blank?
11
11
 
12
- %Q(<a href="javascript:;" onclick="doknoOpenPanel('#{j article.slug}');">#{link_text.presence || article.title}</a>).html_safe
12
+ %Q(<a class="dokno-link" href="javascript:;" onclick="doknoOpenPanel('#{j article.slug}');">#{link_text.presence || article.title}</a>).html_safe
13
13
  end
14
14
  end
15
15
  end
@@ -1,5 +1,8 @@
1
1
  module Dokno
2
2
  class ApplicationRecord < ActiveRecord::Base
3
3
  self.abstract_class = true
4
+
5
+ include Engine.routes.url_helpers
6
+ include ActionView::Helpers::DateHelper
4
7
  end
5
8
  end
@@ -3,9 +3,6 @@ require 'redcarpet'
3
3
 
4
4
  module Dokno
5
5
  class Article < ApplicationRecord
6
- include Engine.routes.url_helpers
7
- include ActionView::Helpers::DateHelper
8
-
9
6
  has_and_belongs_to_many :categories
10
7
  has_many :logs, dependent: :destroy
11
8
  has_many :article_slugs, dependent: :destroy
@@ -76,7 +73,10 @@ module Dokno
76
73
  .where(dokno_articles_categories: { article_id: id })
77
74
  .all
78
75
  .map do |category|
79
- "<a class='underline' href='#{article_index_path(category.code)}?search_term=#{CGI.escape(search_term.to_s)}&order=#{CGI.escape(order.to_s)}'>#{category.name}</a>" if context_category_id != category.id
76
+ next if context_category_id == category.id
77
+
78
+ "<a class='underline' href='#{article_index_path(category.code)}?search_term="\
79
+ "#{CGI.escape(search_term.to_s)}&order=#{CGI.escape(order.to_s)}'>#{category.name}</a>"
80
80
  end.compact
81
81
 
82
82
  return '' if names.blank?
@@ -1,41 +1,33 @@
1
1
  module Dokno
2
2
  class Category < ApplicationRecord
3
- belongs_to :parent,
4
- class_name: 'Dokno::Category',
5
- primary_key: 'id',
6
- foreign_key: 'category_id',
7
- optional: true,
8
- inverse_of: :children
9
- has_many :children,
10
- class_name: 'Dokno::Category',
11
- primary_key: 'id',
12
- foreign_key: 'category_id',
13
- dependent: :nullify,
14
- inverse_of: :parent
3
+ belongs_to :parent, class_name: 'Dokno::Category', primary_key: 'id', foreign_key: 'category_id', inverse_of: :children, optional: true
4
+ has_many :children, class_name: 'Dokno::Category', primary_key: 'id', foreign_key: 'category_id', inverse_of: :parent, dependent: :nullify
15
5
 
16
6
  has_and_belongs_to_many :articles
17
7
 
8
+ before_validation :set_code
18
9
  validates :name, :code, presence: true, uniqueness: true
19
10
  validate :circular_parent_check
20
11
 
21
- before_validation :set_code
22
-
23
12
  scope :alpha_order, -> { order(:name) }
24
13
 
25
- # The display breadcrumb for the Category
26
- def breadcrumb
27
- crumbs = [name]
14
+ def breadcrumb(**args)
15
+ crumbs = [(category_link(self, args) unless args[:hide_self])]
28
16
  parent_category_id = category_id
29
17
 
30
18
  loop do
31
19
  break if parent_category_id.blank?
32
20
 
33
- parent_category = self.class.find(parent_category_id)
34
- crumbs.prepend parent_category.name
21
+ parent_category = Category.find(parent_category_id)
22
+ crumbs.prepend category_link(parent_category, args)
35
23
  parent_category_id = parent_category.category_id
36
24
  end
37
25
 
38
- crumbs.join(' > ')
26
+ crumbs.compact.join("&nbsp;&nbsp;>&nbsp;&nbsp;").html_safe
27
+ end
28
+
29
+ def category_link(category, args={})
30
+ %(<a href="#{article_index_path(category.code)}?search_term=#{CGI.escape(args[:search_term].to_s)}&order=#{CGI.escape(args[:order].to_s)}">#{category.name}</a>)
39
31
  end
40
32
 
41
33
  # All Articles in the Category, including all child Categories
@@ -73,26 +65,14 @@ module Dokno
73
65
  categories.flatten
74
66
  end
75
67
 
76
- def self.select_option_markup(selected_category_codes: nil, exclude_category_id: nil, context_category: nil, level: 0)
68
+ def self.select_option_markup(selected_category_codes: nil, context_category: nil, level: 0)
77
69
  return '' if level.positive? && context_category.blank?
78
70
 
79
71
  options = []
80
72
  level_categories = where(category_id: context_category&.id).alpha_order
81
-
82
73
  level_categories.each do |category|
83
- options << option_markup(
84
- category: category,
85
- selected_category_codes: selected_category_codes,
86
- exclude_category_id: exclude_category_id,
87
- level: level
88
- )
89
-
90
- options << select_option_markup(
91
- selected_category_codes: selected_category_codes,
92
- exclude_category_id: exclude_category_id,
93
- context_category: category,
94
- level: (level + 1)
95
- )
74
+ options << option_markup(category: category, selected_category_codes: selected_category_codes, level: level)
75
+ options << select_option_markup(selected_category_codes: selected_category_codes, context_category: category, level: (level + 1))
96
76
  end
97
77
 
98
78
  options.join
@@ -100,9 +80,7 @@ module Dokno
100
80
 
101
81
  private
102
82
 
103
- def self.option_markup(category:, selected_category_codes:, exclude_category_id:, level: 0)
104
- return '' if category.id == exclude_category_id
105
-
83
+ def self.option_markup(category:, selected_category_codes:, level: 0)
106
84
  selected = selected_category_codes&.include?(category.code)
107
85
  article_count = category.articles_in_branch.size
108
86
  %(<option value="#{category.code}" #{'selected="selected"' if selected}>#{('&nbsp;&nbsp;' * level)}#{category.name}#{' (' + article_count.to_s + ')' if article_count.positive?}</option>)
@@ -36,9 +36,9 @@
36
36
  </div>
37
37
 
38
38
  <% if Dokno::Category.exists? %>
39
- <div class="mb-5">
40
- <div class="text-lg font-semibold"><label for="category_id"><%= 'Category'.pluralize article.categories.count %></label></div>
41
- <select name="category_code[]" id="category_code" multiple="multiple" size="<%= (cat_count = Dokno::Category.count) <= 4 ? (cat_count + 1).to_s : '5' %>" class="rounded text-xl shadow-inner bg-gray-100 p-2 w-full mt-2 w-full max-w-full">
39
+ <div class="mb-5 w-2/3">
40
+ <div class="text-lg font-semibold"><label for="category_code"><%= 'Category'.pluralize article.categories.count %></label></div>
41
+ <select name="category_code[]" id="category_code" multiple="multiple" size="<%= (cat_count = Dokno::Category.count) <= 9 ? (cat_count + 1).to_s : '10' %>" class="rounded text-xl shadow-inner bg-gray-100 p-2 w-full mt-2 w-full max-w-full">
42
42
  <option></option>
43
43
  <%= Dokno::Category.select_option_markup(selected_category_codes: @category_codes).html_safe %>
44
44
  </select>
@@ -2,7 +2,12 @@
2
2
 
3
3
  <% if @category.present? %>
4
4
  <div class="no-print text-gray-500 mb-5">
5
- <div>Category: <a href="<%= article_index_path(@category.code) %>?search_term=<%= CGI.escape(@search_term.to_s) %>&order=<%= @order %>"><%= @category.breadcrumb %></a></div>
5
+ <div>
6
+ <% if request.referrer&.include? article_index_path %>
7
+ <a class="fixed left-0 ml-6" title="Back" href="javascript:history.back();"><i data-feather="chevrons-left" class="text-gray-300 h-5 align-text-bottom inline"></i></a>
8
+ <% end %>
9
+ <span class="text-gray-500 mr-1">Under</span> <%= @category.breadcrumb(search_term: @search_term, order: @order) %>
10
+ </div>
6
11
  </div>
7
12
  <% end %>
8
13
 
@@ -126,9 +131,9 @@
126
131
  <button title="Edit article" class="bg-blue-900 text-gray-300 hover:text-white rounded mr-5 py-2 px-3 font-bold text-sm" onclick="location.href='<%= edit_article_path(@article.slug) %>';"><i data-feather="edit-2" class="inline h-5"></i> EDIT</button>
127
132
 
128
133
  <% if @article.active %>
129
- <button title="Deactivate article" id="article-deactivate-button" class="bg-yellow-700 text-gray-300 hover:text-white rounded mr-5 py-2 px-3 font-bold text-base" onclick="deactivateArticle('<%= @article.slug %>');"><i data-feather="file-minus" class="inline h-5"></i> DEACTIVATE</button>
134
+ <button title="Deactivate article" id="article-deactivate-button" class="bg-yellow-700 text-gray-300 hover:text-white rounded mr-5 py-2 px-3 font-bold text-base" onclick="setArticleStatus('<%= @article.slug %>', false);"><i data-feather="file-minus" class="inline h-5"></i> DEACTIVATE</button>
130
135
  <% else %>
131
- <button title="Re-activate article" id="article-activate-button" class="bg-green-700 text-gray-300 hover:text-white rounded mr-5 py-2 px-3 font-bold text-base" onclick="activateArticle('<%= @article.slug %>');"><i data-feather="file-plus" class="inline h-5"></i> RE-ACTIVATE</button>
136
+ <button title="Re-activate article" id="article-activate-button" class="bg-green-700 text-gray-300 hover:text-white rounded mr-5 py-2 px-3 font-bold text-base" onclick="setArticleStatus('<%= @article.slug %>', true);"><i data-feather="file-plus" class="inline h-5"></i> RE-ACTIVATE</button>
132
137
  <% end %>
133
138
  <button title="Permanently delete article" class="bg-red-700 text-gray-300 hover:text-white rounded py-2 px-3 font-bold text-base" onclick="deleteArticle('<%= @article.id %>');"><i data-feather="slash" class="inline h-5"></i> DELETE</button>
134
139
  </div>
@@ -10,13 +10,20 @@
10
10
  </div>
11
11
 
12
12
  <% if Dokno::Category.exists? %>
13
- <div class="mb-5">
13
+ <div class="mb-5 w-1/2">
14
14
  <div class="text-lg font-semibold"><label for="parent_category_code">Parent Category</label></div>
15
- <select name="parent_category_code" id="parent_category_code" class="rounded text-xl shadow-inner bg-gray-100 p-2 mt-2 w-1/2 max-w-full">
16
- <option></option>
17
- <%= Dokno::Category.select_option_markup(selected_category_codes: [@parent_category_code], exclude_category_id: category.id).html_safe %>
15
+
16
+ <select name="parent_category_code" id="parent_category_code" size="1" class="rounded text-xl shadow-inner bg-gray-100 p-2 w-full max-w-full">
17
+ <option value="">No Parent Category</option>
18
+
19
+ <optgroup label="Categories">
20
+ <% cache Dokno::Category do %>
21
+ <%= Dokno::Category.select_option_markup.html_safe %>
22
+ <% end %>
23
+ </optgroup>
18
24
  </select>
19
- <div class="text-gray-500 mt-2 w-1/2">
25
+
26
+ <div class="text-gray-500 mt-2">
20
27
  The existing category to which this category belongs.
21
28
  <% if (article_count = category.articles.count).positive? %>
22
29
  There <%= article_count > 1 ? "are #{article_count} articles" : 'is an article' %> currently in this category.
@@ -35,4 +42,8 @@
35
42
  </div>
36
43
  </section>
37
44
 
38
- <script> elem('input#name').focus(); </script>
45
+ <script>
46
+ // Client-side select of cached select list
47
+ selectOption('parent_category_code', '<%= j @parent_category_code %>');
48
+ elem('input#name').focus();
49
+ </script>
@@ -1,6 +1,27 @@
1
+ <% if !current_page?(up_for_review_path) && (@category.blank? || @search_term.present?) %>
2
+ <div class="text-center m-auto mb-10 w-full max-w-screen-xl">
3
+ <% if @search_term.present? %>
4
+ <div class="text-gray-600 text-2xl uppercase">
5
+ <%= @total_records.positive? ? "#{@total_records} #{'article'.pluralize(@total_records)}" : 'No articles' %>
6
+ found containing the search term
7
+ <div class="text-4xl leading-tight"><span class="font-serif">&ldquo;</span> <%= @search_term %> <span class="font-serif">&rdquo;</span> </div>
8
+ </div>
9
+ <% else %>
10
+ <div class="text-gray-600 text-2xl">
11
+ Browse or search
12
+ <% if (article_count = Dokno::Article.count) > 1 %>
13
+ <%= number_with_delimiter(article_count, delimiter: ',') %> articles in
14
+ <% end %>
15
+ the
16
+ </div>
17
+ <div class="text-gray-800 text-4xl leading-tight uppercase"><%= Dokno.config.app_name %> knowledgebase</div>
18
+ <% end %>
19
+ </div>
20
+ <% end %>
21
+
1
22
  <% if @category&.parent.present? %>
2
23
  <div class="text-gray-500 mb-5">
3
- <div><%= @category.breadcrumb %></div>
24
+ <div><span class="text-gray-500 mr-1">Under</span> <%= @category.breadcrumb(search_term: @search_term, order: @order, hide_self: true) %></div>
4
25
  </div>
5
26
  <% end %>
6
27
 
@@ -51,12 +72,6 @@
51
72
  </div>
52
73
  </div>
53
74
  <div class="dokno-article-summary w-2/3 <% unless article.active %>text-gray-500 italic<% end %>">
54
- <% unless article.active %>
55
- <div class="bg-yellow-700 p-4 mb-5 rounded text-lg border-t-4 border-yellow-900 text-white font-base not-italic">
56
- <i data-feather="info" class="inline-block"></i> This article is no longer active
57
- </div>
58
- <% end %>
59
-
60
75
  <div class="dokno-article-content-highlight mb-2"><%= article.summary.presence || 'No summary provided' %></div>
61
76
 
62
77
  <div class="text-base text-gray-500">
@@ -75,6 +90,12 @@
75
90
  </div>
76
91
  <% end %>
77
92
 
93
+ <% if !article.active %>
94
+ <div class="bg-yellow-700 p-4 mt-5 rounded text-lg border-t-4 border-yellow-900 text-white font-base not-italic">
95
+ <i data-feather="info" class="inline-block mr-1"></i> This article is no longer active
96
+ </div>
97
+ <% end %>
98
+
78
99
  <% if article.up_for_review? %>
79
100
  <div class="bg-<%= article.review_due_days.negative? ? 'red' : 'gray' %>-800 p-4 mt-5 rounded text-lg border-t-4 border-<%= article.review_due_days.negative? ? 'red' : 'gray' %>-900 text-white font-base not-italic">
80
101
  <i data-feather="bell" class="inline-block mr-1"></i> <%= article.review_due_days_string %>
@@ -16,6 +16,7 @@
16
16
  </head>
17
17
  <body class="bg-white font-sans font-light subpixel-antialiased text-lg">
18
18
 
19
+
19
20
  <nav id="dokno-nav-container" class="bg-blue-900 text-white py-10 px-16 text-lg">
20
21
  <div class="flex items-center m-auto w-full max-w-screen-xl">
21
22
  <div class="w-1/3">
@@ -42,6 +43,7 @@
42
43
  </div>
43
44
  </nav>
44
45
 
46
+
45
47
  <% flash.each do |type, msg| %>
46
48
  <div class="bg-<%= type %>-800 text-lg text-white font-base py-10 px-16 text-center">
47
49
  <i data-feather="<%= (type == 'green' ? 'smile' : (type == 'yellow' ? 'info' : (type == 'gray' ? 'bell' : 'frown'))) %>" class="inline mr-1"></i>
@@ -49,33 +51,14 @@
49
51
  </div>
50
52
  <% end %>
51
53
 
52
- <main class="py-10 px-16">
53
- <% if !current_page?(up_for_review_path) && @article.blank? && (@category.blank? || @search_term.present?) %>
54
- <div class="text-center m-auto mb-10 w-full max-w-screen-xl">
55
- <% if @search_term.present? %>
56
- <div class="text-gray-600 text-2xl uppercase">
57
- <%= @total_records.positive? ? "#{@total_records} #{'article'.pluralize(@total_records)}" : 'No articles' %>
58
- found containing the search term
59
- <div class="text-4xl leading-tight"><span class="font-serif">&ldquo;</span> <%= @search_term %> <span class="font-serif">&rdquo;</span> </div>
60
- </div>
61
- <% else %>
62
- <div class="text-gray-600 text-2xl">
63
- Browse or search
64
- <% if (article_count = Dokno::Article.count) > 1 %>
65
- <%= number_with_delimiter(article_count, delimiter: ',') %> articles in
66
- <% end %>
67
- the
68
- </div>
69
- <div class="text-gray-800 text-4xl leading-tight uppercase"><%= Dokno.config.app_name %> knowledgebase</div>
70
- <% end %>
71
- </div>
72
- <% end %>
73
54
 
55
+ <main class="py-10 px-16">
74
56
  <div id="dokno-content-container" class="w-full max-w-screen-xl m-auto print-this">
75
57
  <%= yield %>
76
58
  </div>
77
59
  </main>
78
60
 
61
+
79
62
  <footer id="dokno-footer-container">
80
63
  <% if @article.present? && action_name == 'show' %>
81
64
  <div id="dokno-article-log-container" data-category-id="<%= @category&.id %>" data-article-id="<%= @article.id %>">
@@ -83,7 +66,7 @@
83
66
  </div>
84
67
  <% end %>
85
68
 
86
- <% if can_edit? && !current_page?(up_for_review_path) && action_name == 'index' && (up_for_review_count = Dokno::Article.up_for_review.count).positive? %>
69
+ <% if @show_up_for_review && (up_for_review_count = Dokno::Article.up_for_review.count).positive? %>
87
70
  <div id="dokno-articles-up-for-review-container">
88
71
  <div class="py-10 px-16 bg-gray-900">
89
72
  <div class="w-full max-w-screen-xl m-auto">
@@ -119,7 +102,7 @@
119
102
  <%= javascript_include_tag 'init' %>
120
103
 
121
104
  <% if @search_term.present? %>
122
- <script>highlightTerm(['<%= j @search_term.strip %>'], 'dokno-article-content-highlight');</script>
105
+ <script> highlightTerm(['<%= j @search_term.strip %>'], 'dokno-article-content-highlight'); </script>
123
106
  <% end %>
124
107
  </body>
125
108
  </html>
@@ -11,6 +11,11 @@
11
11
  </optgroup>
12
12
  </select>
13
13
  </div>
14
+
15
+ <script>
16
+ // Client-side select of cached select list
17
+ selectOption('category', '<%= j @category&.code %>');
18
+ </script>
14
19
  <% end %>
15
20
 
16
21
  <% if Dokno::Article.exists? %>
@@ -22,8 +27,4 @@
22
27
  <% end %>
23
28
  </div>
24
29
 
25
- <script>
26
- // Client-side select of cached select list
27
- selectOption('category', '<%= j @category&.code %>');
28
- enableSearchHotkey();
29
- </script>
30
+ <script> enableSearchHotkey(); </script>
@@ -19,7 +19,7 @@ module Dokno
19
19
  end
20
20
 
21
21
  initializer 'local_helper.action_controller' do
22
- ActiveSupport.on_load :action_controller do
22
+ ActiveSupport.on_load :action_controller_base do
23
23
  helper Dokno::ApplicationHelper
24
24
  end
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module Dokno
2
- VERSION = '1.3.0'
2
+ VERSION = '1.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dokno
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courtney Payne
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-13 00:00:00.000000000 Z
11
+ date: 2020-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy
@@ -300,7 +300,7 @@ licenses:
300
300
  metadata:
301
301
  bug_tracker_uri: https://github.com/cpayne624/dokno/issues
302
302
  changelog_uri: https://github.com/cpayne624/dokno/blob/master/CHANGELOG.md
303
- post_install_message:
303
+ post_install_message:
304
304
  rdoc_options: []
305
305
  require_paths:
306
306
  - lib
@@ -315,8 +315,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
315
  - !ruby/object:Gem::Version
316
316
  version: '0'
317
317
  requirements: []
318
- rubygems_version: 3.2.0.rc.1
319
- signing_key:
318
+ rubygems_version: 3.1.4
319
+ signing_key:
320
320
  specification_version: 4
321
321
  summary: Dokno (dough-no) is a lightweight mountable Rails Engine for storing and
322
322
  managing your app's domain knowledge.