-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend make visible in stats (#2168)
* used scope to ensure that Moods set to not_visible are not tag-able in Moments * tests for mood visibility in moments * categories and strategy set to visible: false are not shown in dropdown and therefore cannot be selected * changed label with translations * showing "Not visible to tag and display in profile stats" when element is not visible, included translations * reflect changes to visible_helper in spec * rendering icons based on mood visibility * rendered icons conditionally according according to visibility status where applicable * fix rubocop offenses * yarn lint run to solve circle cI --fix * corrected failure test on .storyActionsViewers visiblity problem * added conditional to viewers helper to account for when an element does not respond to the :viewers method * add skipped translation to de.yml * applied suggested changes to DRY the changes made to visibility based methods * when a visibility key (vi sible, not_visible) resolves to false, it will be removed from the returned hash so as not to cause a Type error in the StoryAction.jsx * associated elements are displayed on edit regardless of visiblity status * test to ensure edited elements retain association on edit * rixed typo `reders => renders * Moment and Strategy is unable to remove associations when no params is passed un update * removed redundant model methods and accompanying tests * Moment and Strategy are now able to remove associations when no params is passed to the controller by a before_save callback * update nokogiri to 1.13.9 pass circle ci * removed left over comments from code
- Loading branch information
1 parent
7b9bf25
commit a3e05a8
Showing
35 changed files
with
220 additions
and
200 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
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
# | ||
|
||
class Category < ApplicationRecord | ||
include IsVisibleConcern | ||
extend FriendlyId | ||
|
||
friendly_id :name | ||
|
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
module IsVisibleConcern | ||
extend ActiveSupport::Concern | ||
|
||
included do | ||
scope :is_visible, -> { where(visible: true) } | ||
end | ||
end |
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 |
---|---|---|
|
@@ -14,6 +14,8 @@ | |
# | ||
|
||
class Mood < ApplicationRecord | ||
include IsVisibleConcern | ||
|
||
USER_DATA_ATTRIBUTES = %w[ | ||
id | ||
name | ||
|
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.