-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rubocop autofix * Add example.com to ignore * Complete initial setup for Rubocop * Remove unused code * Run rubocop on CI * Update style guide yml * Finalize Rubocop config/cops * Remove comment annotation * Disable MultilineMethodCallIndentation * Remove unused code * Remove unused code * Fix double negation * Fix cop * Fix cop * Group cops by type * Fix cop
- Loading branch information
1 parent
05fecd4
commit 5e65d08
Showing
33 changed files
with
333 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,7 @@ class AdminController < ApplicationController | |
before_action :require_user, only: %i(spam spam_revisions mark_comment_spam publish_comment) | ||
|
||
# intended to provide integration tests for assets | ||
def assets | ||
end | ||
def assets; end | ||
|
||
def promote_admin | ||
@user = User.find params[:id] | ||
|
@@ -82,7 +81,7 @@ def spam | |
.order('nid DESC') | ||
@nodes = if params[:type] == 'wiki' | ||
@nodes.where(type: 'page', status: 1) | ||
else | ||
else | ||
@nodes.where(status: 0) | ||
end | ||
else | ||
|
@@ -195,7 +194,7 @@ def mark_spam_revision | |
@revision = Revision.find_by(vid: params[:vid]) | ||
@node = Node.find_by(nid: @revision.nid) | ||
|
||
if(@node.revisions.length <= 1) | ||
if @node.revisions.length <= 1 | ||
flash[:warning] = "You can't delete the last remaining revision of a page; try deleting the wiki page itself (if you're an admin) or contacting [email protected] for assistance." | ||
redirect_to @node.path | ||
return | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.