add buffered checkbox to individual articles (#3238)
This commit is contained in:
parent
7fbaadd100
commit
464d37310e
3 changed files with 8 additions and 4 deletions
|
|
@ -72,7 +72,6 @@ class Internal::ArticlesController < Internal::ApplicationController
|
|||
article.boosted_additional_articles = article_params[:boosted_additional_articles].to_s == "true"
|
||||
article.boosted_dev_digest_email = article_params[:boosted_dev_digest_email].to_s == "true"
|
||||
article.user_id = article_params[:user_id].to_i
|
||||
|
||||
article.update!(article_params)
|
||||
Article.where.not(id: article.id).where(live_now: true).update_all(live_now: false) if article.live_now
|
||||
CacheBuster.new.bust "/live_articles"
|
||||
|
|
@ -94,6 +93,7 @@ class Internal::ArticlesController < Internal::ApplicationController
|
|||
:boosted_dev_digest_email,
|
||||
:main_image_background_hex_color,
|
||||
:featured_number,
|
||||
:user_id)
|
||||
:user_id,
|
||||
:last_buffered)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -77,7 +77,12 @@
|
|||
<br /><br />
|
||||
<textarea cols="70" rows="6" wrap="hard" name="article[body_markdown]"><%= article.body_markdown %></textarea>
|
||||
<% end %>
|
||||
|
||||
 
|
||||
<% if article.last_buffered %>
|
||||
<em>Last Buffered <%= article.last_buffered %></em>
|
||||
<% else %>
|
||||
Buffered: <input name="article[last_buffered]" value="<%= Time.current %>" type="checkbox">
|
||||
<% end %>
|
||||
   
|
||||
<button class="btn btn-primary">SUBMIT</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -20,4 +20,3 @@
|
|||
<%= text_field_tag :bust_user, nil, placeholder: "12345" %>
|
||||
<%= submit_tag("Clear Cache") %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue