-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #173 #277
fixes #173 #277
Conversation
applying the suggested solution on merit-gem#173
fixing already initialized constant
Merit::AppBadgeRules = Merit::BadgeRules.new.defined_rules | ||
Merit::AppPointRules = Merit::PointRules.new.defined_rules | ||
Merit::AppBadgeRules ||= Merit::BadgeRules.new.defined_rules | ||
Merit::AppPointRules ||= Merit::PointRules.new.defined_rules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use SCREAMING_SNAKE_CASE for constants.
@@ -85,8 +85,8 @@ class Engine < Rails::Engine | |||
ActiveSupport.on_load(:action_controller) do | |||
begin | |||
# Load app rules on boot up | |||
Merit::AppBadgeRules = Merit::BadgeRules.new.defined_rules | |||
Merit::AppPointRules = Merit::PointRules.new.defined_rules | |||
Merit::AppBadgeRules ||= Merit::BadgeRules.new.defined_rules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use SCREAMING_SNAKE_CASE for constants.
@@ -7,7 +7,7 @@ def has_merit(options = {}) | |||
# That's why MeritableModel belongs_to Sash. Can't use | |||
# dependent: destroy as it may raise FK constraint exceptions. See: | |||
# https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1079-belongs_to-dependent-destroy-should-destroy-self-before-assocation | |||
belongs_to :sash, class_name: 'Merit::Sash', inverse_of: nil | |||
belongs_to :sash, class_name: 'Merit::Sash', inverse_of: nil, optional: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Line is too long. [82/80]
Handled in #282, Please check |
CI is red, and issue was fixed in master. Closing this PR. Thank you both! |
No description provided.